This is an automated email from the ASF dual-hosted git repository.

jfthomps pushed a commit to branch vcl-2.5.1-bugfixes
in repository https://gitbox.apache.org/repos/asf/vcl.git

commit 6ad4da6ab9caa9b102aa1d59db2d65f3edbdc6b5
Author: Josh Thompson <[email protected]>
AuthorDate: Mon Mar 24 12:40:08 2025 -0400

    vcl-install.sh vcl-upgrade.sh: removed RC option, updated to use newer 
download path for downloading archives
---
 vcl-install.sh | 27 ++++-----------------------
 vcl-upgrade.sh | 27 ++++-----------------------
 2 files changed, 8 insertions(+), 46 deletions(-)

diff --git a/vcl-install.sh b/vcl-install.sh
index c4670f38..4f69f5b0 100755
--- a/vcl-install.sh
+++ b/vcl-install.sh
@@ -62,7 +62,7 @@ function help() {
        exit 2
 }
 
-args=$(getopt -q -o dwmht: -l 
database,web,managementnode,help,dbhost:,dbpass:,mnhost:,mnip:,webhost:,adminpass:,timezone:,rc:
 -n $0 -- "$@")
+args=$(getopt -q -o dwmht: -l 
database,web,managementnode,help,dbhost:,dbpass:,mnhost:,mnip:,webhost:,adminpass:,timezone:
 -n $0 -- "$@")
 
 if [ $? -ne 0 ]; then help; fi
 
@@ -80,7 +80,7 @@ WEB_HOST=localhost
 CRYPTKEY=`random_string 20`
 PEMKEY=`random_string 20`
 ARCHIVE=apache-VCL-$VCL_VERSION.tar.bz2
-ARCHIVEURLPATH="http://vcl.apache.org/downloads/download.cgi?action=download&filename=%2Fvcl%2F$VCL_VERSION%2F";
+DOWNLOADARCHIVEURL="http://www.apache.org/dyn/closer.lua/vcl/$VCL_VERSION/$ARCHIVE?action=download";
 SIGPATH="https://www.apache.org/dist/vcl/$VCL_VERSION/";
 TZDEFAULT="America/New_York"
 
@@ -95,7 +95,6 @@ mnipdefault=1
 adminpassdefault=1
 webhostdefault=1
 DODHCP=no
-dorc=0
 TIMEZONE=''
 
 while true; do
@@ -149,11 +148,6 @@ while true; do
                        TIMEZONE=$2
                        shift 2
                        ;;
-               --rc)
-                       RC=$2
-                  dorc=1
-                       shift 2
-                       ;;
                -h|--help)
                        help
                        exit 1
@@ -169,19 +163,6 @@ while true; do
        esac
 done
 
-if [[ $dorc -eq 1 ]]; then
-       if [[ ! $RC =~ ^[0-9]+$ ]]; then
-               echo ""
-               echo "Invalid value specified for --rc=, must be a number"
-               echo ""
-               exit 1
-       fi
-       VCL_VERSION=${VCL_VERSION}-RC$RC
-       ARCHIVE=apache-VCL-$VCL_VERSION.tar.bz2
-       
ARCHIVEURLPATH="https://people.apache.org/~jfthomps/apache-VCL-${VCL_VERSION}/";
-       SIGPATH="https://people.apache.org/~jfthomps/apache-VCL-${VCL_VERSION}/";
-fi
-
 if [[ $DOALL -eq 1 ]]; then
        DODB=1
        DOWEB=1
@@ -446,8 +427,8 @@ function set_localauth_password() {
 }
 
 function download_archive() {
-       wget -q "${ARCHIVEURLPATH}${ARCHIVE}" -O $ARCHIVE
-       if [ $? -ne 0 ]; then generic_error "failed to download $ARCHIVE from 
$ARCHIVEURLPATH"; exit 1; fi
+       wget -q "${DOWNLOADARCHIVEURL}" -O $ARCHIVE
+       if [ $? -ne 0 ]; then generic_error "failed to download from 
$DOWNLOADARCHIVEURL"; exit 1; fi
 }
 
 function validate_archive_sha512() {
diff --git a/vcl-upgrade.sh b/vcl-upgrade.sh
index 29164f05..fbd8b4f1 100755
--- a/vcl-upgrade.sh
+++ b/vcl-upgrade.sh
@@ -55,7 +55,7 @@ function help() {
        exit 2
 }
 
-args=$(getopt -q -o dwmh -l 
database,web,managementnode,help,dbhost:,dbname:,dbadminuser:,dbadminpass:,rc: 
-n $0 -- "$@")
+args=$(getopt -q -o dwmh -l 
database,web,managementnode,help,dbhost:,dbname:,dbadminuser:,dbadminpass: -n 
$0 -- "$@")
 
 if [ $? -ne 0 ]; then help; fi
 
@@ -72,7 +72,7 @@ DB_ADMINPASS=""
 
 DB_HOST=localhost
 ARCHIVE=apache-VCL-$VCL_VERSION.tar.bz2
-ARCHIVEURLPATH="http://vcl.apache.org/downloads/download.cgi?action=download&filename=%2Fvcl%2F$VCL_VERSION%2F";
+DOWNLOADARCHIVEURL="http://www.apache.org/dyn/closer.lua/vcl/$VCL_VERSION/$ARCHIVE?action=download";
 SIGPATH="https://www.apache.org/dist/vcl/$VCL_VERSION/";
 
 DODB=0
@@ -83,7 +83,6 @@ dbhostdefault=1
 dbnamedefault=1
 dbadminuserdefault=1
 dbadminpassdefault=1
-dorc=0
 
 while true; do
        case "$1" in
@@ -122,11 +121,6 @@ while true; do
                        dbadminpassdefault=0
                        shift 2
                        ;;
-               --rc)
-                       RC=$2
-                  dorc=1
-                       shift 2
-                       ;;
                -h|--help)
                        help
                        exit 1
@@ -142,19 +136,6 @@ while true; do
        esac
 done
 
-if [[ $dorc -eq 1 ]]; then
-       if [[ ! $RC =~ ^[0-9]+$ ]]; then
-               echo ""
-               echo "Invalid value specified for --rc=, must be a number"
-               echo ""
-               exit 1
-       fi
-       VCL_VERSION=${VCL_VERSION}-RC$RC
-       ARCHIVE=apache-VCL-$VCL_VERSION.tar.bz2
-       
ARCHIVEURLPATH="https://people.apache.org/~jfthomps/apache-VCL-${VCL_VERSION}/";
-       SIGPATH="https://people.apache.org/~jfthomps/apache-VCL-${VCL_VERSION}/";
-fi
-
 if [[ $DOALL -eq 1 ]]; then
        DODB=1
        DOWEB=1
@@ -296,8 +277,8 @@ if [ $? -ne 0 ]; then echo "Error: Failed to install 
required linux package (wge
 # ------------------------------------ functions 
-------------------------------
 
 function download_archive() {
-       wget -q "$ARCHIVEURLPATH$ARCHIVE" -O $ARCHIVE
-       if [ $? -ne 0 ]; then generic_error "failed to download $ARCHIVE from 
$ARCHIVEURLPATH"; exit 1; fi
+       wget -q "$DOWNLOADARCHIVEURL" -O $ARCHIVE
+       if [ $? -ne 0 ]; then generic_error "failed to download from 
$DOWNLOADARCHIVEURL"; exit 1; fi
 }
 
 function validate_archive_sha512() {

Reply via email to