Skip to content

Commit e529213

Browse files
authored
Merge pull request #184 from dirkmueller/only_edit_executables
Only sed the shebang in executable files
2 parents c146b29 + a512ee0 commit e529213

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flavor.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ done
131131
%#FLAVOR#_fix_shebang_path(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=) \
132132
myargs="%{**}" \
133133
for f in ${myargs}; do \
134-
[ -f $f ] && sed -i "1s@#\\!.*python\\S*@#\\!$(realpath %__#FLAVOR#)@" $f \
134+
[ -f "$f" -a -x "$f" ] && sed -i "1s@#\\!.*python\\S*@#\\!$(realpath %__#FLAVOR#)@" "$f" \
135135
done
136136

137137
# Alternative entries in file section

0 commit comments

Comments
 (0)