Browse Source

build script: add option -n to disable network interaction when running the script

Note that if you run the script while your ImportedSources folder is incomplete, compilation will inevitably fail.
Felix Paul Kühne 11 years ago
parent
commit
81d6a3c53f
1 changed files with 9 additions and 1 deletions
  1. 9 1
      buildAspenProject.sh

+ 9 - 1
buildAspenProject.sh

@@ -9,6 +9,8 @@ SDK=7.0
 SDK_MIN=6.1
 SDK_MIN=6.1
 VERBOSE=no
 VERBOSE=no
 CONFIGURATION="Release"
 CONFIGURATION="Release"
+NONETWORK=no
+
 TESTEDHASH=2791a97f2
 TESTEDHASH=2791a97f2
 TESTEDVLCKITHASH=b343a201d
 TESTEDVLCKITHASH=b343a201d
 TESTEDMEDIALIBRARYKITHASH=973a5eb38
 TESTEDMEDIALIBRARYKITHASH=973a5eb38
@@ -23,6 +25,7 @@ OPTIONS
    -v       Be more verbose
    -v       Be more verbose
    -s       Build for simulator
    -s       Build for simulator
    -d       Enable Debug
    -d       Enable Debug
+   -n       Skip script steps requiring network interaction
 EOF
 EOF
 }
 }
 
 
@@ -64,7 +67,7 @@ buildxcodeproj()
                IPHONEOS_DEPLOYMENT_TARGET=${SDK_MIN} > ${out}
                IPHONEOS_DEPLOYMENT_TARGET=${SDK_MIN} > ${out}
 }
 }
 
 
-while getopts "hvsdk:" OPTION
+while getopts "hvsdnk:" OPTION
 do
 do
      case $OPTION in
      case $OPTION in
          h)
          h)
@@ -79,6 +82,9 @@ do
              ;;
              ;;
          d)  CONFIGURATION="Debug"
          d)  CONFIGURATION="Debug"
              ;;
              ;;
+         n)
+             NONETWORK=yes
+             ;;
          k)
          k)
              SDK=$OPTARG
              SDK=$OPTARG
              ;;
              ;;
@@ -114,6 +120,7 @@ mkdir -p External
 
 
 spushd ImportedSources
 spushd ImportedSources
 
 
+if [ "$NONETWORK" != "yes" ]; then
 if ! [ -e vlc ]; then
 if ! [ -e vlc ]; then
 git clone git://git.videolan.org/vlc/vlc-2.1.git vlc
 git clone git://git.videolan.org/vlc/vlc-2.1.git vlc
 info "Applying patches to vlc.git"
 info "Applying patches to vlc.git"
@@ -225,6 +232,7 @@ cd ..
 else
 else
 cd InAppSettingsKit && git pull --rebase && cd ..
 cd InAppSettingsKit && git pull --rebase && cd ..
 fi
 fi
+fi
 
 
 info "Setup 'External' folders"
 info "Setup 'External' folders"