SHARE
TWEET

Untitled

a guest May 26th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. source /home/socomd/.local/paths.var
  4.  
  5. if [ -z "$1" ]; then
  6.   echo ""
  7.   echo "You must specify what to build."
  8.   echo ""
  9.   echo "Current options are:"
  10.   echo "build_repos fob"
  11.   echo "build_repos main"
  12.   echo "build_repos test"
  13.   echo ""
  14.   read -rsp $'Press any key to continue...\n' -n1 key
  15. fi
  16.  
  17. LWD=`pwd`
  18.  
  19. cd $ARMA3SYNC
  20.  
  21. dialog --infobox "Please wait..." 3 50 ; sleep 1
  22.  
  23. FINDERROR=$(find $PRODUCTION $REPOS $FOBS_SOURCE $MISSIONS_SOURCE $TVT_SOURCE $MISSION_INCLUDE -xtype l -print)
  24. LOOP=0
  25. while [ ! -z "$FINDERROR" ]; do
  26.   LOOP=$((LOOP+1))
  27.   dialog --cr-wrap --msgbox "There appears to be broken links somewhere, this will break ArmA3Sync. Please fix these and click OK to retry:\n\n$FINDERROR\n\nAttempt#$LOOP" 30 70
  28.   FINDERROR=$(find $PRODUCTION $REPOS $FOBS_SOURCE $MISSIONS_SOURCE $TVT_SOURCE $MISSION_INCLUDE -xtype l -print)
  29. done
  30.  
  31. if [ $1 = "fob" ]; then
  32.   FINISH="SOCOMD FOBs"
  33.   strip_addons
  34.   dialog --infobox "Building $FINISH repo..." 3 50 ; sleep 1
  35.   java -Xms256m -Xmx256m -jar $ARMA3SYNCBIN -BUILD "SOCOMD FOBs"
  36.   ERROR=$?
  37.   if [ $ERROR != "0" ]; then
  38.     echo "Build ran in to errors."
  39.     read -rsp $'Press any key to continue...\n' -n1 key
  40.     exit
  41.   fi
  42.   sleep 1
  43. fi
  44.  
  45. if [ $1 = "main" ]; then
  46.   FINISH="SOCOMD Mods"
  47.   dialog --infobox "Building $FINISH repo..." 3 50 ; sleep 1
  48.   java -Xms256m -Xmx256m -jar $ARMA3SYNCBIN -BUILD "SOCOMD Mods"
  49.   ERROR=$?
  50.   if [ $ERROR != "0" ]; then
  51.     echo "Build ran in to errors."
  52.     read -rsp $'Press any key to continue...\n' -n1 key
  53.     exit
  54.   fi
  55.   sleep 1
  56. fi
  57. if [ $1 = "joint" ]; then
  58.   FINISH="SOCOMD Joint Ops"
  59.   dialog --infobox "Building $FINISH repo..." 3 50 ; sleep 1
  60.   java -Xms256m -Xmx256m -jar $ARMA3SYNCBIN -BUILD "SOCOMD Joint Ops"
  61.   ERROR=$?
  62.   if [ $ERROR != "0" ]; then
  63.     echo "Build ran in to errors."
  64.     read -rsp $'Press any key to continue...\n' -n1 key
  65.     exit
  66.   fi
  67.   sleep 1
  68. fi
  69.  
  70. if [ $1 = "test" ]; then
  71.   FINISH="SOCOMD Testing"
  72.   dialog --infobox "Building $FINISH repo..." 3 50 ; sleep 1
  73.   java -Xms256m -Xmx256m -jar $ARMA3SYNCBIN -BUILD "SOCOMD Testing"
  74.   ERROR=$?
  75.   if [ $ERROR != "0" ]; then
  76.     echo "Build ran in to errors."
  77.     read -rsp $'Press any key to continue...\n' -n1 key
  78.     exit
  79.   fi
  80.   sleep 1
  81. fi
  82.  
  83. if [ $1 = "community" ]; then
  84.   FINISH="SOCOMD Community"
  85.   dialog --infobox "Building $FINISH repo..." 3 50 ; sleep 1
  86.   java -Xms256m -Xmx256m -jar $ARMA3SYNCBIN -BUILD "SOCOMD Community"
  87.   ERROR=$?
  88.   if [ $ERROR != "0" ]; then
  89.     echo "Build ran in to errors."
  90.     read -rsp $'Press any key to continue...\n' -n1 key
  91.     exit
  92.   fi
  93.   sleep 1
  94. fi
  95.  
  96. cd $LWD
  97.  
  98. dialog --infobox "$FINISH repo build complete." 3 50 ; sleep 2
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top