Procházet zdrojové kódy

Merge pull request #1759 from jaapmarcus/fix/branch-check

Add extra branch check
Kristan Kenney před 4 roky
rodič
revize
27dcc0849c
1 změnil soubory, kde provedl 12 přidání a 1 odebrání
  1. 12 1
      bin/v-update-sys-hestia-git

+ 12 - 1
bin/v-update-sys-hestia-git

@@ -133,6 +133,11 @@ if [ ! -z "$2" ]; then
 else
 else
     source /usr/local/hestia/conf/hestia.conf
     source /usr/local/hestia/conf/hestia.conf
     branch=$RELEASE_BRANCH
     branch=$RELEASE_BRANCH
+    branch_check=$(curl -s --head -w %{http_code} https://raw.githubusercontent.com/$fork/hestiacp/$branch/src/deb/hestia/control -o /dev/null)
+    if [ $branch_check -ne "200" ]; then
+        echo "ERROR: invalid branch name specified."
+        exit 1
+    fi
 fi
 fi
 
 
 if [ -z "$branch" ]; then
 if [ -z "$branch" ]; then
@@ -148,7 +153,13 @@ echo "[*] Checking for missing dependencies and installing required libraries...
 apt-get -qq install -y $SOFTWARE > /dev/null 2>&1
 apt-get -qq install -y $SOFTWARE > /dev/null 2>&1
 
 
 # Fix for Debian PHP Envroiment
 # Fix for Debian PHP Envroiment
-ln -s /usr/include/x86_64-linux-gnu/curl /usr/local/include/curl > /dev/null 2>&1
+if [ ! -e /usr/local/include/curl ]; then
+    if [ $BUILD_ARCH == "amd64" ]; then
+        ln -s /usr/include/x86_64-linux-gnu/curl /usr/local/include/curl
+    else
+        echo "No x86_64 working"
+    fi
+fi
 
 
 # Get system cpu cores
 # Get system cpu cores
 NUM_CPUS=$(grep "^cpu cores" /proc/cpuinfo | uniq |  awk '{print $4}')
 NUM_CPUS=$(grep "^cpu cores" /proc/cpuinfo | uniq |  awk '{print $4}')