File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 6767
6868 if echo "$INSTALLATION_SCRIPT" 2>/dev/null | grep -q "^SITE="; then
6969 site_ref=$(echo "$INSTALLATION_SCRIPT" 2>/dev/null | grep "^SITE=" | head -1 | awk -F'"' '$0=$2')
70- if echo "$INSTALLATION_SCRIPT" 2>/dev/null | grep -q "^version=.*curl .*codeberg.org"; then
70+ if [ -z "$site_ref" ]; then
71+ if echo "$INSTALLATION_SCRIPT" 2>/dev/null | grep -q "^version=.*curl .*api.github.com"; then
72+ SITE=$(echo "$INSTALLATION_SCRIPT" 2>/dev/null | grep "^version" | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" | head -1 | sed 's#//api.#//#g; s#/repos/#/#g; s#/releases.*##')
73+ else
74+ SITE=$(echo "$INSTALLATION_SCRIPT" 2>/dev/null | grep "^version" | grep -Eo "(http|https)://[a-zA-Z0-9.?=_%:-]*" | head -1)
75+ fi
76+ elif echo "$INSTALLATION_SCRIPT" 2>/dev/null | grep -q "^version=.*curl .*codeberg.org"; then
7177 SITE="https://codeberg.org/$site_ref"
7278 elif echo "$INSTALLATION_SCRIPT" 2>/dev/null | grep -q "^version=.*curl .*api.github.com" || ! echo "$site_ref" 2>/dev/null | grep -q "^http://\|^https://\|^ftp://"; then
7379 SITE="https://github.com/$site_ref"
You can’t perform that action at this time.
0 commit comments