diff options
author | Astound <kirito@disroot.org> | 2024-08-01 23:55:55 +0800 |
---|---|---|
committer | Astound <kirito@disroot.org> | 2024-08-01 23:55:55 +0800 |
commit | 38ea97b31b3d6ee21a9e9c0f65d63c2868341edc (patch) | |
tree | 1941996cfd0a35718b1e8cae814b11556c4cb574 /hyperterm/core | |
parent | c19d3a94142527e8ed22d48f4f1ee7a00e493a72 (diff) | |
download | hyperterm-38ea97b31b3d6ee21a9e9c0f65d63c2868341edc.tar.lz hyperterm-38ea97b31b3d6ee21a9e9c0f65d63c2868341edc.tar.xz hyperterm-38ea97b31b3d6ee21a9e9c0f65d63c2868341edc.zip |
update URLs
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 |