aboutsummaryrefslogtreecommitdiffstats
path: root/main/sprunge
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-05-13 12:21:19 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-05-13 12:21:48 +0000
commitbf69c863bd75979c53c6d07e13c520662daefdae (patch)
tree5a1cfb7a6b4b1eca92efbe0dd8f6c96c326ba909 /main/sprunge
parent029d708d9a10f5ca53cf2b1c280f1d8aa8fff363 (diff)
downloadaports-bf69c863bd75979c53c6d07e13c520662daefdae.tar.bz2
aports-bf69c863bd75979c53c6d07e13c520662daefdae.tar.xz
main/sprunge: add support for dpaste
Diffstat (limited to 'main/sprunge')
-rw-r--r--main/sprunge/APKBUILD14
1 files changed, 11 insertions, 3 deletions
diff --git a/main/sprunge/APKBUILD b/main/sprunge/APKBUILD
index 5ae053dcec..9e17e7e49c 100644
--- a/main/sprunge/APKBUILD
+++ b/main/sprunge/APKBUILD
@@ -1,10 +1,10 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sprunge
-pkgver=0.1
+pkgver=0.2
pkgrel=0
pkgdesc="Helper script to paste things to http://sprunge.us"
-url="http://strunge.us"
+url="http://sprunge.us"
arch="noarch"
license="GPLv2"
depends="curl"
@@ -22,12 +22,20 @@ build() {
cd "$_builddir"
cat >"$_builddir"/sprunge<<EOF
#!/bin/sh
-exec curl -F 'sprunge=<-' http://sprunge.us
+
+case \${0##*/} in
+ sprunge)
+ exec curl -F 'sprunge=<-' http://sprunge.us;;
+ dpaste)
+ exec curl --silent -F 'content=<-' http://dpaste.de/api/ \
+ | sed -e 's/"//g' -e 's/$/raw\n/';;
+esac
EOF
}
package() {
cd "$_builddir"
install -Dm755 sprunge "$pkgdir"/usr/bin/sprunge
+ ln -s sprunge "$pkgdir"/usr/bin/dpaste
}