diff --git a/notwa-util/acquire b/notwa-util/acquire index 97d6e83..dc65470 100755 --- a/notwa-util/acquire +++ b/notwa-util/acquire @@ -41,7 +41,7 @@ || exit \ ;done \ && { [ "${#from}" != 0 ] || die "missing a required key: from" ;} \ - && if [ "$from" = github ] \ + && if [ "$from" = github ] || [ "$from" = sourcehut ] \ ;then : \ && missing key repo "$repo" \ && missing key commit "$commit" \ @@ -55,7 +55,11 @@ ;fi \ && remote_fn="$commit.tar.gz" \ && local_fn="$username!$project-$remote_fn" \ - && remote_url="https://github.com/$repo/archive/$remote_fn" \ + && pathy="$repo/archive/$remote_fn" \ + && case "$from" in + (github) remote_url="https://github.com/$pathy" ;; \ + (sourcehut) remote_url="https://git.sr.ht/~$pathy" ;; \ + esac \ && sha256="$checksum" \ && { [ "${#dest}" != 0 ] || dest="${repo##*/}" ;} \ ;else : \