Przeglądaj źródła

* Search for 'bash' to run for build

svn: 1547
Bryan Drewery 21 lat temu
rodzic
commit
e0f2a73888
1 zmienionych plików z 10 dodań i 1 usunięć
  1. 10 1
      build

+ 10 - 1
build

@@ -1,7 +1,16 @@
 #! /bin/sh
 # We want to use BASH, not whatever /bin/sh points to.
 if test -z "$BASH"; then
-  bash $0 ${1+"$@"}
+  bash="`which bash`"
+  if ! test -e ${bash}; then
+    bash="/bin/bash"
+  fi
+
+  if ! test -e ${bash}; then
+    bash="/usr/local/bin/bash"
+  fi
+
+  ${bash} $0 ${1+"$@"}
   exit 0
 fi