Skip to content

Commit

Permalink
Merge pull request #184 from dirkmueller/only_edit_executables
Browse files Browse the repository at this point in the history
Only sed the shebang in executable files
  • Loading branch information
mcepl authored Oct 31, 2024
2 parents c146b29 + a512ee0 commit e529213
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flavor.in
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ done
%#FLAVOR#_fix_shebang_path(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=) \
myargs="%{**}" \
for f in ${myargs}; do \
[ -f $f ] && sed -i "1s@#\\!.*python\\S*@#\\!$(realpath %__#FLAVOR#)@" $f \
[ -f "$f" -a -x "$f" ] && sed -i "1s@#\\!.*python\\S*@#\\!$(realpath %__#FLAVOR#)@" "$f" \
done

# Alternative entries in file section
Expand Down

0 comments on commit e529213

Please sign in to comment.