Procházet zdrojové kódy

Changes due to the fork:branch support in v-update-sys-hestia-git

Jaap Marcus před 3 roky
rodič
revize
ddaf8b9ab2
1 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 3 3
      bin/v-update-sys-hestia-git

+ 3 - 3
bin/v-update-sys-hestia-git

@@ -182,20 +182,20 @@ install_build() {
 }
 }
 
 
 # Set install flags
 # Set install flags
-if [ -n "$1" ]; then
+if [ -n "$fork" ]; then
     fork_check=$(curl -s --head -w %{http_code} https://raw.githubusercontent.com/$fork/hestiacp/main/src/deb/hestia/control -o /dev/null)
     fork_check=$(curl -s --head -w %{http_code} https://raw.githubusercontent.com/$fork/hestiacp/main/src/deb/hestia/control -o /dev/null)
     if [ "$fork_check" -ne "200" ]; then
     if [ "$fork_check" -ne "200" ]; then
         echo "ERROR: invalid repository name specified."
         echo "ERROR: invalid repository name specified."
         exit 1
         exit 1
     else
     else
         echo "[!] Download code from GitHub repository: $fork"
         echo "[!] Download code from GitHub repository: $fork"
-        fork="$1"
     fi
     fi
 else
 else
     fork="hestiacp"
     fork="hestiacp"
 fi
 fi
 
 
-if [ -n "$2" ]; then
+if [ -n "$branch" ]; then
+    echo https://raw.githubusercontent.com/$fork/hestiacp/$branch/src/deb/hestia/control;
     branch_check=$(curl -s --head -w %{http_code} https://raw.githubusercontent.com/$fork/hestiacp/$branch/src/deb/hestia/control -o /dev/null)
     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
     if [ $branch_check -ne "200" ]; then
         echo "ERROR: invalid branch name specified."
         echo "ERROR: invalid branch name specified."