diff options
author | hauptmech | 2013-01-17 13:03:34 +0100 |
---|---|---|
committer | Benjamin Chrétien | 2015-06-20 02:25:11 +0900 |
commit | 5c90be666022c1bdf8abffe316920b944851a9cd (patch) | |
tree | db3469845d3bdb7867543bd17a1b509cba1eca27 /fix-python-scripts.sh | |
download | aur-5c90be666022c1bdf8abffe316920b944851a9cd.tar.gz |
Squashed commits
Diffstat (limited to 'fix-python-scripts.sh')
-rwxr-xr-x | fix-python-scripts.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fix-python-scripts.sh b/fix-python-scripts.sh new file mode 100755 index 000000000000..2bc55852b364 --- /dev/null +++ b/fix-python-scripts.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -z "$1" ]; then + echo "Usage: $0 <directory>" + echo "" + echo "Makes sure that all python scripts use the python2 command" + exit 1 +fi + +for file in $(grep -rl 'env python *$' $1); do + if [ -z "$file" ]; then + echo "Error finding files." + exit 1 + fi + sed -i 's/env python *$/env python2/g' $file +done + |