Procházet zdrojové kódy

* Search for 'bash' to run for build

svn: 1547
Bryan Drewery před 21 roky
rodič
revize
e0f2a73888
1 změnil soubory, kde provedl 10 přidání a 1 odebrání
  1. 10 1
      build

+ 10 - 1
build

@@ -1,7 +1,16 @@
 #! /bin/sh
 #! /bin/sh
 # We want to use BASH, not whatever /bin/sh points to.
 # We want to use BASH, not whatever /bin/sh points to.
 if test -z "$BASH"; then
 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
   exit 0
 fi
 fi