haha yeah actually vars is a good idea

This commit is contained in:
Zergling_man 2023-06-19 00:07:45 +10:00
parent ebd79fc601
commit bcd456e55b
4 changed files with 8 additions and 6 deletions

View File

@ -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'

View File

@ -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))

View File

@ -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")

View File

@ -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=$*"; }