diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..0b9a21d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,18 @@ +# Maintainer: Zergling_man, from fedora.email + +pkgname=clemmy +pkgver=0.1.0 +pkgrel=1 +pkgdesc='A pure bash client for lemmy, with multiaccount support.' +arch=('any') +url='https://gitea.rakka.tk/Zergling_man/clemmy' +license=('GPL' 'custom:plusnigger.autism.exposed') +depends=('curl' 'jq') +source=('https://gitea.rakka.tk/Zergling_man/clemmy/raw/branch/master/shitty_api.sh') +sha256sums=('f3a3c9453158ca713b5a5fb21e0510a681a143ae74fc105364901248ad2f86b9') + +package() { + install -d ${pkgdir}/usr/bin + cp ${srcdir}/shitty_api.sh ${pkgdir}/usr/bin/shitty_api + chmod +x ${pkgdir}/usr/bin/shitty_api +} \ No newline at end of file diff --git a/shitty_api.sh b/shitty_api.sh index 5f72269..162ce73 100755 --- a/shitty_api.sh +++ b/shitty_api.sh @@ -67,9 +67,10 @@ login(){ post "user/login" "{\"username_or_email\":\"$1\",\"password\":\"$2\"}"; #Misc deref(){ getauth "resolve_object" "" "q=$*"; } -while getopts "a:h" o;do case "${o}" in +while getopts "a:hv" o;do case "${o}" in a) INSTANCE=${insts[$OPTARG]}; TOKE=${tokes[$OPTARG]};; h) echo $actions; exit;; + v) echo 0.1.0; exit;; esac done shift $((OPTIND-1))