# Contributor: Natanael Copa # Maintainer: Natanael Copa global pkgname := 'sprunge' global pkgver := '0.6' global pkgrel := '0' global pkgdesc := '"Helper script to paste things to http://sprunge.us'" global url := '"http://sprunge.us'" global arch := '"noarch'" global license := '"GPLv2'" global depends := '"curl'" global makedepends := '' global install := ''"" global subpackages := '"tpaste dpaste ix'" global source := ''"" global _builddir := $srcdir proc prepare { return 0 } proc build { cd $_builddir } proc package { cd $_builddir mkdir -p "$pkgdir"/usr/bin printf "#!/bin/sh\n\nexec curl -F 'sprunge=<-' http://sprunge.us" > \ "$pkgdir"/usr/bin/sprunge || return 1 chmod 755 "$pkgdir"/usr/bin/sprunge || return 1 } proc tpaste { cd $_builddir global url := '"http://tpaste.us'" global pkgdesc := ""Helper script to paste things to $url"" mkdir -p "$subpkgdir"/usr/bin printf "#!/bin/sh\n\nexec curl -F 'tpaste=<-' http://tpaste.us" > \ "$subpkgdir"/usr/bin/tpaste || return 1 chmod 755 "$subpkgdir"/usr/bin/tpaste || return 1 } proc dpaste { cd $_builddir global url := '"http://dpaste.com'" global pkgdesc := ""Helper script to paste things to $url"" mkdir -p "$subpkgdir"/usr/bin printf "#!/bin/sh\n\nexec curl --silent -F 'content=<-' https://dpaste.de/api/ | sed -e 's/\"//g' -e 's/\$/\/raw\\\n/'" > \ "$subpkgdir"/usr/bin/dpaste || return 1 chmod 755 "$subpkgdir"/usr/bin/dpaste || return 1 } proc ix { cd $_builddir global url := '"http://ix.io'" global pkgdesc := ""Helper script to paste things to $url"" mkdir -p "$subpkgdir"/usr/bin printf "#!/bin/sh\n\nexec curl -F f:1='<-' ix.io/" > \ "$subpkgdir"/usr/bin/ix || return 1 chmod 755 "$subpkgdir"/usr/bin/ix || return 1 } (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(sprunge)} spids:[6])] spids: [6] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(0.6)} spids:[9])] spids: [9] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(0)} spids:[12])] spids: [12] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Helper script to paste things to http://sprunge.us"))} spids: [15] ) ] spids: [15] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("http://sprunge.us"))} spids: [20] ) ] spids: [20] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (noarch))} spids:[25])] spids: [25] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ (GPLv2))} spids:[30])] spids: [30] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:depends) op:Equal rhs:{(DQ (curl))} spids:[35])] spids: [35] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:makedepends) op:Equal rhs:{(SQ )} spids:[40])] spids: [40] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:install) op:Equal rhs:{(DQ )} spids:[42])] spids: [42] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: {(DQ ("tpaste dpaste ix"))} spids: [46] ) ] spids: [46] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:source) op:Equal rhs:{(DQ )} spids:[51])] spids: [51] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:_builddir) op: Equal rhs: {(DQ ($ VSub_Name "$srcdir"))} spids: [56] ) ] spids: [56] ) (FuncDef name: prepare body: (BraceGroup children: [(ControlFlow token: arg_word:{(0)})] spids: [66] ) spids: [62 65] ) (FuncDef name: build body: (BraceGroup children:[(C {(cd)} {(DQ ($ VSub_Name "$_builddir"))})] spids:[80]) spids: [76 79] ) (FuncDef name: package body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$_builddir"))}) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/bin)}) (AndOr children: [ (SimpleCommand words: [ {(printf)} { (DQ ("#!/bin/sh") (EscapedLiteralPart token:) (EscapedLiteralPart token:) ("exec curl -F 'sprunge=<-' http://sprunge.us") ) } ] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ ($ VSub_Name "$pkgdir")) (/usr/bin/sprunge)} spids: [125] ) ] ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(chmod)} {(755)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/bin/sprunge)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) ] spids: [96] ) spids: [92 95] ) (FuncDef name: tpaste body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$_builddir"))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("http://tpaste.us"))} spids: [173] ) ] spids: [173] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Helper script to paste things to ") ($ VSub_Name "$url"))} spids: [179] ) ] spids: [179] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin)}) (AndOr children: [ (SimpleCommand words: [ {(printf)} { (DQ ("#!/bin/sh") (EscapedLiteralPart token:) (EscapedLiteralPart token:) ("exec curl -F 'tpaste=<-' http://tpaste.us") ) } ] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin/tpaste)} spids: [205] ) ] ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(chmod)} {(755)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin/tpaste)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) ] spids: [163] ) spids: [159 162] ) (FuncDef name: dpaste body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$_builddir"))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("http://dpaste.com"))} spids: [253] ) ] spids: [253] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Helper script to paste things to ") ($ VSub_Name "$url"))} spids: [259] ) ] spids: [259] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin)}) (AndOr children: [ (SimpleCommand words: [ {(printf)} { (DQ ("#!/bin/sh") (EscapedLiteralPart token:) (EscapedLiteralPart token:) ("exec curl --silent -F 'content=<-' https://dpaste.de/api/ | sed -e 's/") (EscapedLiteralPart token:) ("//g' -e 's/") (EscapedLiteralPart token:) (/) (EscapedLiteralPart token:) (raw) (EscapedLiteralPart token:) (EscapedLiteralPart token:) ("/'") ) } ] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin/dpaste)} spids: [294] ) ] ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(chmod)} {(755)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin/dpaste)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) ] spids: [243] ) spids: [239 242] ) (FuncDef name: ix body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$_builddir"))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("http://ix.io"))} spids: [342] ) ] spids: [342] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Helper script to paste things to ") ($ VSub_Name "$url"))} spids: [348] ) ] spids: [348] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin)}) (AndOr children: [ (SimpleCommand words: [ {(printf)} { (DQ ("#!/bin/sh") (EscapedLiteralPart token:) (EscapedLiteralPart token:) ("exec curl -F f:1='<-' ix.io/") ) } ] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin/ix)} spids: [374] ) ] ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(chmod)} {(755)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin/ix)}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) ] spids: [332] ) spids: [328 331] ) ] )