now works from other dirs, and PKGBUILD might work
This commit is contained in:
parent
b7159cecef
commit
890087df08
13
PKGBUILD
13
PKGBUILD
|
@ -2,17 +2,18 @@
|
|||
|
||||
pkgname=clemmy
|
||||
pkgver=0.1.0
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
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')
|
||||
source=('git+https://gitea.rakka.tk/Zergling_man/clemmy.git')
|
||||
#sha256sums=('') Don't know how to use this on a repo.
|
||||
|
||||
package() {
|
||||
install -d ${pkgdir}/usr/bin
|
||||
cp ${srcdir}/shitty_api.sh ${pkgdir}/usr/bin/shitty_api
|
||||
chmod +x ${pkgdir}/usr/bin/shitty_api
|
||||
install -d ${pkgdir}/usr/bin ${pkgdir}/opt/clemmy
|
||||
cp *.sh ${pkgdir}/opt/clemmy
|
||||
ln -s ${pkgdir}/opt/clemmy/clemmy.sh ${pkgdir}/usr/bin/clemmy
|
||||
chmod +x ${pkgdir}/usr/bin/
|
||||
}
|
12
clemmy.sh
12
clemmy.sh
|
@ -1,10 +1,12 @@
|
|||
#!/bin/sh
|
||||
|
||||
source ./api.sh
|
||||
source ./commands/commands.sh
|
||||
source ./pretty.sh
|
||||
source ./creds.sh
|
||||
source ./utils.sh
|
||||
imps=$(dirname $(realpath $0))
|
||||
|
||||
source $imps/api.sh
|
||||
source $imps/commands/commands.sh
|
||||
source $imps/pretty.sh
|
||||
source $imps/creds.sh
|
||||
source $imps/utils.sh
|
||||
|
||||
while getopts "a:i:hv" o;do case "${o}" in
|
||||
a) INSTANCE=${insts[$OPTARG]}; TOKE=${tokes[$OPTARG]};;
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
actions="notifs notifs2 comments freepost shitpost follow unfollow home deref whoami login"
|
||||
#Endpoints in other files mostly.
|
||||
source commands/accounts.sh
|
||||
source commands/communities.sh
|
||||
source commands/lurking.sh
|
||||
source commands/posts.sh
|
||||
imps=$(dirname $(realpath $0))
|
||||
|
||||
source $imps/commands/accounts.sh
|
||||
source $imps/commands/communities.sh
|
||||
source $imps/commands/lurking.sh
|
||||
source $imps/commands/posts.sh
|
||||
#Misc
|
||||
deref(){ getauth "resolve_object" "" "q=$*"; }
|
Loading…
Reference in New Issue
Block a user