4 # patch-scripts.bash - relocate interpreter paths of Isabelle scripts.
15 if [ -f "$DEFAULT" ]; then # preferred location
16 echo "found $DEFAULT" >&2
20 BASE=$(basename "$DEFAULT")
21 BINARY=$(type -path "$BASE")
22 if [ -n "$BINARY" ]; then
23 echo "found $BINARY" >&2
27 echo "WARNING: $BASE not found!" >&2
37 BASH=$(findbin /bin/bash)
38 PERL=$(findbin /usr/bin/perl)
40 for FILE in $(find . -type f -print)
42 if [ -x "$FILE" ]; then
43 sed -e "s:^#!.*/bash:#!$BASH:" -e "s:^#!.*/perl:#!$PERL:" $FILE >$FILE~~
44 if cmp $FILE $FILE~~ -s; then