You need to sign in or sign up before continuing.
Commit 4437824c authored by George V. Kouryachy (Fr. Br. George)'s avatar George V. Kouryachy (Fr. Br. George) Committed by Vitaly Lipatov

repack.d/generic.sh: more common python -> python2 shebang suport

parent 16fded68
......@@ -15,12 +15,14 @@ done
for i in $BUILDROOT/usr/bin/* ; do
[ -f "$i" ] || continue
grep -q '^#!/usr/bin/python' $i && flag_python3=1
grep -Eq '^#!/usr/bin/python|^#!/usr/bin/env python' $i && flag_python3=1
subst 's|^#!/usr/bin/python$|#!/usr/bin/python3|' $i
subst 's|^#!/usr/bin/env python$|#!/usr/bin/env python3|' $i
done
# check for .py scripts
find $BUILDROOT -name "*.py" | grep -q "\.py$" && flag_python3=1
find $BUILDROOT -name "*.py" -exec subst '1{/python3/n};1i#!/usr/bin/python3' {} \;
if [ -n "$flag_python3" ] ; then
epm install --skip-installed rpm-build-python3
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment