diff options
Diffstat (limited to 'main/sprunge')
-rw-r--r-- | main/sprunge/APKBUILD | 14 |
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 } |