diff --git a/PKGBUILD b/PKGBUILD index 0b9a21d..773237d 100644 --- a/PKGBUILD +++ b/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/ } \ No newline at end of file diff --git a/clemmy.sh b/clemmy.sh index 82fc8ca..6170b90 100755 --- a/clemmy.sh +++ b/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]};; diff --git a/commands/commands.sh b/commands/commands.sh index 33c0b1e..cbb7f9d 100644 --- a/commands/commands.sh +++ b/commands/commands.sh @@ -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=$*"; } \ No newline at end of file