]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
bootstrap.sh: refactor
authorTravis Cross <tc@traviscross.com>
Wed, 4 Apr 2012 22:55:20 +0000 (22:55 +0000)
committerTravis Cross <tc@traviscross.com>
Wed, 4 Apr 2012 23:01:33 +0000 (23:01 +0000)
bootstrap.sh

index bd8c7679b258d5645b23ab7e4b65e5803fbacaab..8dede079015eb09fbd79f099298512014f89bea6 100755 (executable)
@@ -7,14 +7,15 @@ echo "bootstrap: checking installation..."
 BGJOB=false
 BASEDIR=`pwd`;
 LIBDIR=${BASEDIR}/libs;
-SUBDIRS="ilbc curl iksemel js js/nsprpub ldns libdingaling libedit libsndfile pcre sofia-sip \
-        speex sqlite srtp openzap freetdm spandsp libg722_1 portaudio unimrcp tiff-3.8.2 broadvoice silk libcodec2";
-SUBDIRS_ONLY=false
+SUBDIRS="apr \
+  ilbc curl iksemel js js/nsprpub ldns libdingaling libedit libsndfile pcre sofia-sip \
+  speex sqlite srtp openzap freetdm spandsp libg722_1 portaudio unimrcp tiff-3.8.2 broadvoice silk libcodec2 \
+  fs";
 
 while getopts 'jhd:' o; do 
   case "$o" in
     j) BGJOB=true;;
-    d) SUBDIRS="$OPTARG" SUBDIRS_ONLY=true;;
+    d) SUBDIRS="$OPTARG";;
     h) echo "Usage: $0 <options>"
       echo "  Options:"
       echo "           -d 'library1 library2'"
@@ -377,6 +378,9 @@ bootstrap_fs() {
 
 bootstrap_libs() {
   for i in ${SUBDIRS}; do
+    case "$i" in
+      apr|fs) bootstrap_$i && continue ;;
+    esac
     if [ "${BGJOB}" = "false" ]; then
       libbootstrap ${i}
     else
@@ -394,9 +398,7 @@ run() {
   check_lt_ver
   check_libtoolize
   print_autotools_vers
-  test $SUBDIRS_ONLY || bootstrap_apr
   bootstrap_libs
-  test $SUBDIRS_ONLY || bootstrap_fs
   if [ "${BGJOB}" = "true" ]; then
     wait
   fi