Doesn't depend on bash being in any specific location anymore.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@659 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,7 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
#!/usr/bin/bash
|
|
||||||
# Substitute a string in many files. By Serge van den Boom, 20020826
|
# Substitute a string in many files. By Serge van den Boom, 20020826
|
||||||
|
|
||||||
|
# We need bash functionality. Executing bash with the shebang won't be
|
||||||
|
# portable as the location of bash differs.
|
||||||
|
SHELLFILE="$_"
|
||||||
|
case "$SHELLFILE" in
|
||||||
|
sh|*/sh)
|
||||||
|
exec bash "$0" "$@"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
{
|
{
|
||||||
echo "subst: substitute a string in a lot of files."
|
echo "subst: substitute a string in a lot of files."
|
||||||
|
|||||||
Reference in New Issue
Block a user