failed attempt to add sr.ht support

This commit is contained in:
Shelvacu
2024-12-03 11:34:24 -08:00
committed by Shelvacu on fw
parent 9874f2b946
commit c3016579c5
2 changed files with 14 additions and 4 deletions

View File

@@ -13,15 +13,24 @@ writers.writeBashBin "update-git-keys" ''
url_base="https://api.github.com"
elif [ $domain = gitlab.com ]; then
url_base="https://$domain/api/v4"
elif [ $domain = sr.ht ]; then
url_bash="https://meta.sr.ht/api"
else
url_base="https://$domain/api/v1"
fi
url_keys="$url_base/user/keys"
if [ $domain = "git.uninsane.org" ]; then
if [ $domain = sr.ht ]; then
url_keys="$url_base/user/ssh-keys"
else
url_keys="$url_base/user/keys"
fi
if [ $domain = "git.uninsane.org" ] || [ $domain = "sr.ht" ]; then
authorization_name="token"
else
authorization_name="Bearer"
fi
curl_common=( \
${lib.getExe curl} \
--fail \