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