mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-12 18:59:50 +03:00
main/tpaste: modernize
also fixes building in rootbld because you can't write to pwd in subpackage functions
This commit is contained in:
parent
c4966602c1
commit
17adb5d29f
1 changed files with 18 additions and 8 deletions
|
@ -13,8 +13,11 @@ builddir="$srcdir"
|
|||
|
||||
package() {
|
||||
mkdir -p "$pkgdir"/usr/bin
|
||||
printf "#!/bin/sh\n\nexec curl -sSF 'tpaste=<-' $url" > \
|
||||
"$pkgdir"/usr/bin/tpaste
|
||||
cat > "$pkgdir"/usr/bin/tpaste <<-EOF
|
||||
#!/bin/sh
|
||||
|
||||
exec curl -sSF 'tpaste=<-' $url
|
||||
EOF
|
||||
chmod 755 "$pkgdir"/usr/bin/tpaste
|
||||
}
|
||||
|
||||
|
@ -22,17 +25,24 @@ dpaste() {
|
|||
url="https://dpaste.com"
|
||||
pkgdesc="Helper script to paste things to $url"
|
||||
|
||||
printf > dpaste -- '%s\n' \
|
||||
'#!/bin/sh' '' \
|
||||
"exec curl -sSF 'content=<-' "$url/api/v2/" | sed -e 's/\$/.txt/'"
|
||||
install -Dm 0755 dpaste "$subpkgdir/usr/bin/dpaste"
|
||||
mkdir -p "$subpkgdir"/usr/bin
|
||||
cat > "$subpkgdir"/usr/bin/dpaste <<-EOF
|
||||
#!/bin/sh
|
||||
|
||||
exec curl -sSF 'content=<-' "$url/api/v2/" | sed -e 's/\$/.txt/'
|
||||
EOF
|
||||
chmod 755 "$subpkgdir"/usr/bin/dpaste
|
||||
}
|
||||
|
||||
ix() {
|
||||
url="https://ix.io"
|
||||
pkgdesc="Helper script to paste things to $url"
|
||||
|
||||
mkdir -p "$subpkgdir"/usr/bin
|
||||
printf "#!/bin/sh\n\nexec curl -sSF f:1='<-' $url/" > \
|
||||
"$subpkgdir"/usr/bin/ix
|
||||
cat > "$subpkgdir"/usr/bin/ix <<-EOF
|
||||
#!/bin/sh
|
||||
|
||||
exec curl -sSF f:1='<-' $url/
|
||||
EOF
|
||||
chmod 755 "$subpkgdir"/usr/bin/ix
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue