cicku pushed to git-cola (f21). "fix #!/usr/bin/env/python to #!/usr/bin/env/python3 everywhere"

notifications at fedoraproject.org notifications at fedoraproject.org
Wed Apr 1 01:17:24 UTC 2015


>From 846c54ab9315452b2e092e187aeab02bfc4a0a40 Mon Sep 17 00:00:00 2001
From: Kevin Kofler <Kevin at tigcc.ticalc.org>
Date: Mon, 15 Dec 2014 03:56:15 +0100
Subject: fix #!/usr/bin/env/python to #!/usr/bin/env/python3 everywhere


diff --git a/git-cola.spec b/git-cola.spec
index a98cce0..2a020b0 100644
--- a/git-cola.spec
+++ b/git-cola.spec
@@ -43,6 +43,10 @@ git-cola is a powerful git GUI with a slick and intuitive user interface.
 
 %prep
 %setup -q
+%if 0%{?python3}
+# fix #!/usr/bin/env/python to #!/usr/bin/env/python3 everywhere
+find . -type f -exec sh -c "head {} -n 1 | grep ^#\!\ \*/usr/bin/env\ python >/dev/null && sed -i -e sX^#\!\ \*/usr/bin/env\ python\ \*"\\\$"X#\!/usr/bin/env\ python3Xg {}" \;
+%endif
 
 %build
 export PYTHON="%{__python}"
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/git-cola.git/commit/?h=f21&id=846c54ab9315452b2e092e187aeab02bfc4a0a40


More information about the scm-commits mailing list