Просмотр исходного кода

Merge branch 'main' into feature/user-roles

Kristan Kenney 4 лет назад
Родитель
Сommit
33c812baff
1 измененных файлов с 12 добавлено и 1 удалено
  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
     source /usr/local/hestia/conf/hestia.conf
     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
 
 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
 
 # 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
 NUM_CPUS=$(grep "^cpu cores" /proc/cpuinfo | uniq |  awk '{print $4}')