diff options
merge: Merge branch 'master' into vscodium
-rwxr-xr-x | pkg | 13 | ||||
-rw-r--r-- | src/memdmp/zsh-zuwu/APKBUILD | 6 | ||||
-rwxr-xr-x | src/memdmp/zsh-zuwu/zsh-zuwu.post-deinstall | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | src/memdmp/zsh-zuwu/zsh-zuwu.post-install | 0 |
4 files changed, 15 insertions, 6 deletions
@@ -1,20 +1,27 @@ #!/usr/bin/env zsh set -e +BIN="$0" OPERATION="$1" REPO="$2" PKG="$3" syntax() { - echo -e "\x1b[0;31mSyntax: $0 <add|del|readd> <REPONAME> <PKG>\x1b[0m" 1>&2; exit 1; + echo -e "\x1b[0;91mSyntax: $BIN <add|del|readd> <REPONAME> <PKG>\x1b[0m" 1>&2; exit 1; } if [[ "$REPO" == "" ]]; then syntax; fi if [[ "$PKG" == "" ]]; then syntax; fi +if ! [[ -f "src/$REPO/$PKG/APKBUILD" ]]; then + echo -e "\x1b[0;91mThe package $PKG does not exist in $REPO in the current source tree.\x1b[0m" 1>&2; exit 1; +fi +if ! ls "target/$REPO/"*"/$PKG"*".apk" > /dev/null 2>/dev/null; then + echo -e "\x1b[0;91mThe package $PKG does not exist in $REPO in the current target, yet does exist in the source tree. Try building it.\x1b[0m" 1>&2; exit 1; +fi if [[ "$OPERATION" == "readd" ]]; then sudo apk del "$PKG"; - sudo apk add --repository "$(busybox dirname "$(busybox realpath "$0")")/target/$REPO" "$PKG"; + sudo apk add --repository "$(busybox dirname "$(busybox realpath "$BIN")")/target/$REPO" "$PKG"; elif [[ "$OPERATION" == "del" ]]; then sudo apk del "$PKG"; elif [[ "$OPERATION" == "add" ]]; then - sudo apk add --repository "$(busybox dirname "$(busybox realpath "$0")")/target/$REPO" "$PKG"; + sudo apk add --repository "$(busybox dirname "$(busybox realpath "$BIN")")/target/$REPO" "$PKG"; else syntax; fi
\ No newline at end of file diff --git a/src/memdmp/zsh-zuwu/APKBUILD b/src/memdmp/zsh-zuwu/APKBUILD index 2c128da..bf52783 100644 --- a/src/memdmp/zsh-zuwu/APKBUILD +++ b/src/memdmp/zsh-zuwu/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: memdmp <memdmp@estrogen.zone> _pkgname="zuwu" pkgname="zsh-$_pkgname" -pkgver=0.2.0 +pkgver=0.3.0 pkgrel=0 pkgdesc="Opinionated ZSH \"Microframework\" to give a baseline usable experience" url="https://git.estrogen.zone/zuwu.git/" @@ -9,7 +9,7 @@ arch="all" license="MIT" depends="zsh" makedepends="lzip" -install="$pkgname.post-install" +install="$pkgname.post-install $pkgname.post-deinstall" subpackages="" source="https://git.estrogen.zone/zuwu.git/snapshot/$_pkgname-$pkgver.tar.lz" builddir="$srcdir/$_pkgname-$pkgver" @@ -27,5 +27,5 @@ package() { # TODO: write examples :3 sha512sums=" -f66cd3462c60d467f1855cd8622962c5dd61f1c604d681c78d8db7ce8ae3c676a801731411703305d9a4fa61ae7e99b2dc4da1a6e5bd168cd6b5ed517d545517 zuwu-0.2.0.tar.lz +03331bd523e2e6c1ca79c8e59a4c052884fa08f584440fecedafee5a28623c8161d1a7358fb5a03455b70384aa63cab327c32f7c0bf67570346298a357e2c0ff zuwu-0.3.0.tar.lz " diff --git a/src/memdmp/zsh-zuwu/zsh-zuwu.post-deinstall b/src/memdmp/zsh-zuwu/zsh-zuwu.post-deinstall new file mode 100755 index 0000000..a7488a9 --- /dev/null +++ b/src/memdmp/zsh-zuwu/zsh-zuwu.post-deinstall @@ -0,0 +1,2 @@ +#!/usr/bin/env zsh +echo -e "\x1b[0;32mEach user that had zuwu installed should clean up their \x1b[0;34m\$HOME/.zshrc\x1b[0;32m.\nIf they don't, everything will still continue to work, it's just good practice to remove it :3\x1b[0m" diff --git a/src/memdmp/zsh-zuwu/zsh-zuwu.post-install b/src/memdmp/zsh-zuwu/zsh-zuwu.post-install index a4cf43d..a4cf43d 100644..100755 --- a/src/memdmp/zsh-zuwu/zsh-zuwu.post-install +++ b/src/memdmp/zsh-zuwu/zsh-zuwu.post-install |