Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../lib/rpm
File: pythondeps.sh
#!/bin/bash
[0] Fix | Delete
[1] Fix | Delete
[ $# -ge 1 ] || {
[2] Fix | Delete
cat > /dev/null
[3] Fix | Delete
exit 0
[4] Fix | Delete
}
[5] Fix | Delete
[6] Fix | Delete
case $1 in
[7] Fix | Delete
-P|--provides)
[8] Fix | Delete
shift
[9] Fix | Delete
# Match buildroot/payload paths of the form
[10] Fix | Delete
# /PATH/OF/BUILDROOT/usr/bin/pythonMAJOR.MINOR
[11] Fix | Delete
# generating a line of the form
[12] Fix | Delete
# python(abi) = MAJOR.MINOR
[13] Fix | Delete
# (Don't match against -config tools e.g. /usr/bin/python2.6-config)
[14] Fix | Delete
grep "/usr/bin/python.\..$" \
[15] Fix | Delete
| sed -e "s|.*/usr/bin/python\(.\..\)|python(abi) = \1|"
[16] Fix | Delete
;;
[17] Fix | Delete
-R|--requires)
[18] Fix | Delete
shift
[19] Fix | Delete
# Match buildroot paths of the form
[20] Fix | Delete
# /PATH/OF/BUILDROOT/usr/lib/pythonMAJOR.MINOR/ and
[21] Fix | Delete
# /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/
[22] Fix | Delete
# generating (uniqely) lines of the form:
[23] Fix | Delete
# python(abi) = MAJOR.MINOR
[24] Fix | Delete
grep -E "/usr/lib[^/]*/python[[:digit:]]+\.[[:digit:]]+/.*" \
[25] Fix | Delete
| sed -Ee "s|.*/usr/lib[^/]*/python([[:digit:]]+\.[[:digit:]]+)/.*|python(abi) = \1|g" \
[26] Fix | Delete
| sort | uniq
[27] Fix | Delete
;;
[28] Fix | Delete
esac
[29] Fix | Delete
[30] Fix | Delete
exit 0
[31] Fix | Delete
[32] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function