main/sprunge: use https when possible

fixes tpaste which no longer work without https

(cherry picked from commit bdabb612ab82a1c781d4083b391e2225e8827d10)
This commit is contained in:
Natanael Copa 2020-05-12 08:40:01 +00:00
parent 49428d1d52
commit fce5f96d39

View File

@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sprunge
pkgver=0.7
pkgrel=0
pkgrel=1
pkgdesc="Helper script to paste things to http://sprunge.us"
url="http://sprunge.us"
arch="noarch"
@ -21,10 +21,10 @@ package() {
tpaste() {
cd "$builddir"
url="http://tpaste.us"
url="https://tpaste.us"
pkgdesc="Helper script to paste things to $url"
mkdir -p "$subpkgdir"/usr/bin
printf "#!/bin/sh\n\nexec curl -F 'tpaste=<-' http://tpaste.us" > \
printf "#!/bin/sh\n\nexec curl -F 'tpaste=<-' https://tpaste.us" > \
"$subpkgdir"/usr/bin/tpaste
chmod 755 "$subpkgdir"/usr/bin/tpaste
}
@ -36,18 +36,18 @@ dpaste() {
printf > dpaste -- '%s\n' \
'#!/bin/sh' '' \
"exec curl --silent -F 'content=<-' 'http://dpaste.com/api/v2/' | sed -e 's/\$/.txt/'"
"exec curl --silent -F 'content=<-' "$url/api/v2/" | sed -e 's/\$/.txt/'"
install -Dm 0755 dpaste "$subpkgdir/usr/bin/dpaste"
}
dpaste_de() {
cd "$builddir"
url="https://dpaste.de/"
url="https://dpaste.de"
pkgdesc="Helper script to paste things to $url"
printf > dpaste-de -- '%s\n' \
'#!/bin/sh' '' \
"exec curl --silent -F 'format=url' -F 'lexer=_text' -F 'content=<-' 'https://dpaste.de/api/' | sed -e 's,\$,/raw,'"
"exec curl --silent -F 'format=url' -F 'lexer=_text' -F 'content=<-' "$url/api/" | sed -e 's,\$,/raw,'"
install -Dm 0755 dpaste-de "$subpkgdir/usr/bin/dpaste-de"
}
@ -56,7 +56,7 @@ ix() {
url="http://ix.io"
pkgdesc="Helper script to paste things to $url"
mkdir -p "$subpkgdir"/usr/bin
printf "#!/bin/sh\n\nexec curl -F f:1='<-' ix.io/" > \
printf "#!/bin/sh\n\nexec curl -F f:1='<-' $url/" > \
"$subpkgdir"/usr/bin/ix
chmod 755 "$subpkgdir"/usr/bin/ix
}