From bcd456e55b009c1b62066a043bf0c1c0760b4a6d Mon Sep 17 00:00:00 2001 From: Zergling_man Date: Mon, 19 Jun 2023 00:07:45 +1000 Subject: [PATCH] haha yeah actually vars is a good idea --- PKGBUILD | 4 ++-- clemmy.sh | 2 +- commands/accounts.sh | 4 ++-- commands/commands.sh | 4 +++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 2f98997..86c043a 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -2,8 +2,8 @@ #Well, it seems to work now. pkgname=clemmy -pkgver=0.1.1 -pkgrel=2 +pkgver=0.1.2 +pkgrel=1 pkgdesc='A pure bash client for lemmy, with multiaccount support.' arch=('any') url='http://precious.harpy.faith/Zergling_man/clemmy' diff --git a/clemmy.sh b/clemmy.sh index 173328b..eb567b8 100755 --- a/clemmy.sh +++ b/clemmy.sh @@ -12,7 +12,7 @@ while getopts "a:hi:v" o;do case "${o}" in a) INSTANCE=${insts[$OPTARG]}; TOKE=${tokes[$OPTARG]};; i) INSTANCE=$OPTARG;; h) echo $actions; exit;; - v) echo 0.1.1; exit;; + v) echo 0.1.2; exit;; esac done shift $((OPTIND-1)) diff --git a/commands/accounts.sh b/commands/accounts.sh index fb9a71e..d74adea 100644 --- a/commands/accounts.sh +++ b/commands/accounts.sh @@ -18,8 +18,8 @@ register() namedget reg_email "Email address $em" if [ $app == true ]; then namedget reg_appa "Application question: $appq"; fi result="$(post "user/register" "{\"username\":\"$reg_username\",\"password\":\"$reg_pw\",\"password_verify\":\"$reg_pw2\",\"email\":\"$reg_email\",\"answer\":\"$reg_appa\"}")" - if [ ! $(jq .error <<< "result") == "captcha_incorrect" ]; then - jq <<< "result"; exit; + if [ ! $(jq .error <<< "$result") == "captcha_incorrect" ]; then + jq <<< "$result"; exit; fi a="$(get "user/get_captcha" ".ok")" reg_uuid=$(jq -r '.uuid' <<< "$a") diff --git a/commands/commands.sh b/commands/commands.sh index cbb7f9d..964290d 100644 --- a/commands/commands.sh +++ b/commands/commands.sh @@ -1,4 +1,4 @@ -actions="notifs notifs2 comments freepost shitpost follow unfollow home deref whoami login" +actions="notifs notifs2 comments freepost shitpost follow unfollow home deref whoami login pendcount pending" #Endpoints in other files mostly. imps=$(dirname $(realpath $0)) @@ -6,5 +6,7 @@ source $imps/commands/accounts.sh source $imps/commands/communities.sh source $imps/commands/lurking.sh source $imps/commands/posts.sh +source $imps/commands/admin.sh + #Misc deref(){ getauth "resolve_object" "" "q=$*"; } \ No newline at end of file