diff options
Diffstat (limited to 'hyperterm/core')
-rw-r--r-- | hyperterm/core/update.sh | 21 |
1 files changed, 11 insertions, 10 deletions
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 |