util: add sourcehut support to acquire
This commit is contained in:
parent
6abe53acf8
commit
6bb35ed5b5
1 changed files with 6 additions and 2 deletions
|
@ -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 : \
|
||||
|
|
Loading…
Add table
Reference in a new issue