summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobiot2021-10-30 16:45:12 +0300
committerrobiot2021-10-30 16:45:12 +0300
commit4685cbe94e2889caf2fabf5f630f1f288acb4bbe (patch)
tree0a1800e649ed99f7b1305406041d930c3bf3dd54
parent0abf1bcf961e8474fffb5dada50b000d4b66ea77 (diff)
downloadaur-4685cbe94e2889caf2fabf5f630f1f288acb4bbe.tar.gz
Add zash.install
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD5
-rw-r--r--git.sh2
-rw-r--r--zash.install13
4 files changed, 17 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2e54d87720d4..085ece353f78 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index 2d4f9a8d7aa7..cbb6ba4839b7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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
diff --git a/git.sh b/git.sh
index acccf09da58f..fe99dfb1a430 100644
--- a/git.sh
+++ b/git.sh
@@ -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
+}