summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gregoratto2019-07-26 21:04:44 +1000
committerStephen Gregoratto2019-07-26 21:06:13 +1000
commit7aad5bbbe8c6955e41776bdef4d52e87dda3b714 (patch)
tree695c82a466c78724425c766621fdcff5b245bc63
parent5f1a03baa3182a4f987de1efaeb92e1aa86c03f1 (diff)
downloadaur-7aad5bbbe8c6955e41776bdef4d52e87dda3b714.tar.gz
add mrsh to /etc/shells, note libedit optdepend
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD6
-rw-r--r--mrsh-git.install12
3 files changed, 19 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8df008175d6..0a27478ec2d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,9 @@
pkgbase = mrsh-git
pkgdesc = A minimal POSIX shell
- pkgver = r342.7f363b2
+ pkgver = r417.a2f07ab
pkgrel = 2
url = https://git.sr.ht/~emersion/mrsh
+ install = mrsh-git.install
arch = i686
arch = x86_64
arch = armv6h
@@ -10,6 +11,7 @@ pkgbase = mrsh-git
license = custom: MIT
makedepends = git
makedepends = meson
+ optdepends = libedit: alternate readline library
provides = mrsh
source = mrsh::git+https://git.sr.ht/~emersion/mrsh
sha256sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 0ff09afe5b9..2e3c8bfeaeb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,15 +1,17 @@
-# Maintainer: KingofToasters <dev at sgregoratto dot me>
+# Maintainer: KingofToasters <dev@sgregoratto.me>
pkgname=mrsh-git
-pkgver=r342.7f363b2
+pkgver=r417.a2f07ab
pkgrel=2
pkgdesc='A minimal POSIX shell'
url='https://git.sr.ht/~emersion/mrsh'
license=('custom: MIT')
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
makedepends=('git' 'meson')
+optdepends=('libedit: alternate readline library')
provides=('mrsh')
source=("${pkgname%-git}::git+$url")
sha256sums=('SKIP')
+install="mrsh-git.install"
pkgver() {
cd "$srcdir/${pkgname%-git}"
diff --git a/mrsh-git.install b/mrsh-git.install
new file mode 100644
index 00000000000..9eea176c884
--- /dev/null
+++ b/mrsh-git.install
@@ -0,0 +1,12 @@
+post_install() {
+ grep -qe '^/bin/mrsh$' etc/shells || echo '/bin/mrsh' >> etc/shells
+ grep -qe '^/usr/bin/mrsh$' etc/shells || echo '/usr/bin/mrsh' >> etc/shells
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ sed -i -r '/^(\/usr)?\/bin\/mrsh$/d' etc/shells
+}