diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-05-13 12:21:19 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-05-13 12:21:48 +0000 |
commit | bf69c863bd75979c53c6d07e13c520662daefdae (patch) | |
tree | 5a1cfb7a6b4b1eca92efbe0dd8f6c96c326ba909 | |
parent | 029d708d9a10f5ca53cf2b1c280f1d8aa8fff363 (diff) | |
download | aports-bf69c863bd75979c53c6d07e13c520662daefdae.tar.bz2 aports-bf69c863bd75979c53c6d07e13c520662daefdae.tar.xz |
main/sprunge: add support for dpaste
-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 5ae053dce..9e17e7e49 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 } |