diff options
author | robiot | 2021-10-30 16:45:12 +0300 |
---|---|---|
committer | robiot | 2021-10-30 16:45:12 +0300 |
commit | 4685cbe94e2889caf2fabf5f630f1f288acb4bbe (patch) | |
tree | 0a1800e649ed99f7b1305406041d930c3bf3dd54 | |
parent | 0abf1bcf961e8474fffb5dada50b000d4b66ea77 (diff) | |
download | aur-4685cbe94e2889caf2fabf5f630f1f288acb4bbe.tar.gz |
Add zash.install
-rw-r--r-- | .SRCINFO | 1 | ||||
-rw-r--r-- | PKGBUILD | 5 | ||||
-rw-r--r-- | git.sh | 2 | ||||
-rw-r--r-- | zash.install | 13 |
4 files changed, 17 insertions, 4 deletions
@@ -3,6 +3,7 @@ pkgbase = zash pkgver = 0.1.0 pkgrel = 1 url = https://github.com/robiot/zash + install = zash.install arch = x86_64 arch = aarch64 license = GPL-3.0 @@ -8,6 +8,7 @@ license=('GPL-3.0') makedepends=('cargo') sha512sums=('SKIP') source=("git+https://github.com/robiot/$pkgname.git") +install=zash.install build() { cd $pkgname @@ -17,7 +18,5 @@ build() { package() { cd $pkgname - install -Dm 755 target/release/${pkgname} ${pkgdir}/usr/bin/${pkgname} -} - +}
\ No newline at end of file @@ -1,5 +1,5 @@ #!/bin/bash -rm -r pkg src zash zash-* +rm -rf pkg src zash zash-* makepkg --printsrcinfo > .SRCINFO git add . diff --git a/zash.install b/zash.install new file mode 100644 index 000000000000..ac9327cc469f --- /dev/null +++ b/zash.install @@ -0,0 +1,13 @@ + +post_install() { + grep -qe '^/usr/bin/zash$' etc/shells || echo '/usr/bin/zash' >> etc/shells + grep -qe '^/bin/zash$' etc/shells || echo '/bin/zash' >> etc/shells +} + +post_upgrade() { + post_install +} + +pre_remove() { + sed -ri -e '\|^/usr/bin/zash$|d' -e '\|^/bin/zash$|d' etc/shells +} |