]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Major cleanup to separate error handling from normal flow
authorhno <>
Tue, 4 Sep 2001 04:15:07 +0000 (04:15 +0000)
committerhno <>
Tue, 4 Sep 2001 04:15:07 +0000 (04:15 +0000)
Added creation of cfgaux if it does not exists

bootstrap.sh

index 166f66ed7036f643bd99fd972b3cc2f0aecd1dfc..623faa3cb01e5a3ddfbe3e07ca2783aeb48a1ca2 100755 (executable)
@@ -4,24 +4,23 @@
 # configure has not been run, or if a Makefile.am in a non-configured directory
 # has been updated
 
-if ! ( aclocal ) ; then
-  echo "aclocal failed" 
-else
-  if ! ( autoheader ) ; then
-    echo "autoheader failed"
-  else
-    if ! ( automake --foreign --add-missing ) ; then
-      echo "automake failed"
-    else
-      if ! ( autoconf ) ; then
-       echo "autoconf failed"
-      else
-       echo "Autotool bootstrapping complete."
-       exit 0
-      fi
-    fi
+
+bootstrap() {
+  if ! "$@"; then
+    echo "$1 failed"
+    echo "Autotool bootstrapping failed. You will need to investigate and correct" ;
+    echo "before you can develop on this source tree" 
+    exit 1
   fi
-fi
+}
+
+# Make sure cfgaux exists
+mkdir -p cfgaux
+
+# Bootstrap the autotool subsystems
+bootstrap aclocal
+bootstrap autoheader
+bootstrap automake --foreign --add-missing
+bootstrap autoconf
 
-echo "Autotool bootstrapping failed. You will need to investigate and correct" ;
-echo "before you can develop on this source tree" 
+echo "Autotool bootstrapping complete."