summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew T Hoare2017-08-06 16:53:29 +0100
committerMatthew T Hoare2017-08-06 16:53:29 +0100
commit9b6a2bd1487862d29d0cc67988ab8416ce81c73e (patch)
treecd00003a22f58fe506ba1418fae53d24efc17e4d
parentbe42d2205b45f9c364c223e188c7d0b96c62c051 (diff)
downloadaur-9b6a2bd1487862d29d0cc67988ab8416ce81c73e.tar.gz
Added /usr/bin/mksh to /etc/shells to prevent pkexec error; also added post_upgrade().
-rw-r--r--PKGBUILD2
-rw-r--r--mksh.install9
2 files changed, 8 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 0e3a33dcf91..ae7d016882b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@ _pkgname=mksh
_pkgver=R55
pkgver=55.r3131.b903a5e
pkgrel=1
-pkgdesc='The MirBSD Korn Shell - an enhanced version of the public domain ksh, statically-linked development version.'
+pkgdesc='The MirBSD Korn Shell - an enhanced version of the public domain ksh (statically-linked development version)'
url='https://www.mirbsd.org/mksh.htm'
license=('custom')
arch=('i686' 'x86_64')
diff --git a/mksh.install b/mksh.install
index f096a2b6617..84bbedf435d 100644
--- a/mksh.install
+++ b/mksh.install
@@ -1,9 +1,14 @@
post_install() {
- grep -x /bin/mksh /etc/shells >/dev/null || echo /bin/mksh >>/etc/shells
+ grep -x '/bin/mksh' /etc/shells 2>/dev/null || echo '/bin/mksh' >> /etc/shells
+ grep -x '/usr/bin/mksh' /etc/shells 2>/dev/null || echo '/usr/bin/mksh' >> /etc/shells
+}
+
+post_upgrade() {
+ post_install
}
post_remove() {
- sed -i "/^\/bin\/mksh$/d" /etc/shells
+ sed -i '/^(\/usr)?\/bin\/mksh$/d' /etc/shells
}
# vim:set ts=2 sw=2 et: