From 38ea97b31b3d6ee21a9e9c0f65d63c2868341edc Mon Sep 17 00:00:00 2001 From: Astound Date: Thu, 1 Aug 2024 23:55:55 +0800 Subject: update URLs --- hyperterm/core/update.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'hyperterm/core/update.sh') diff --git a/hyperterm/core/update.sh b/hyperterm/core/update.sh index 486a09d..a3b4f9c 100644 --- a/hyperterm/core/update.sh +++ b/hyperterm/core/update.sh @@ -14,16 +14,15 @@ function _url_exists() { } function _urls() { - URL_1="https://c.fridu.us/software/hyperterm.git" - URL_2="https://git.sr.ht/~heckyel/hyperterm" - case $(_url_exists "$URL_1") in - 200) URL="$URL_1" - RAW="$URL_1/plain";; - esac - case $(_url_exists "$URL_2") in - 200) URL="$URL_2" - RAW="$URL_2/blob/master";; - esac + URL_1="https://git.fridu.us/heckyel/hyperterm" + URL_2="https://c.fridu.us/software/hyperterm.git" + if [ "$(_url_exists "$URL_1")" -eq 200 ]; then + URL="$URL_1" + RAW="$URL_1/raw/branch/master" + elif [ "$(_url_exists "$URL_2")" -eq 200 ]; then + URL="$URL_2" + RAW="$URL_2/plain" + fi } # ---------------------- @@ -81,6 +80,8 @@ function updbashrc() { case $(_url_exists "$URL") in 200) # clone '--depth=1' not support cgit + msg "Usando: $URL" \ + "Using: $URL" (git clone $URL /tmp/hyperterm/ --depth=1 &> /dev/null) printf '%s\r' "##### (33%)" sleep 1 -- cgit v1.2.3