summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew T Hoare2018-03-11 13:12:53 +0000
committerMatthew T Hoare2018-03-11 13:12:53 +0000
commitd4360752cc9615056d9c2b7f668b550e00203531 (patch)
treeca6da9bbf48fe7422d291136bb6e7105017795e2
downloadaur-d4360752cc9615056d9c2b7f668b550e00203531.tar.gz
First commit.
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD17
-rw-r--r--dashbinsh.hook11
-rw-r--r--dashbinsh.install11
4 files changed, 52 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d9733d2444f0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,13 @@
+pkgbase = dashbinsh
+ pkgdesc = Relink /bin/sh to dash
+ pkgver = 0.1
+ pkgrel = 3
+ install = dashbinsh.install
+ arch = x86_64
+ license = GPL
+ depends = dash
+ source = dashbinsh.hook
+ sha512sums = 8135b7225ff50b475321425059afc567bd54debb7a113337c442ca5394c137f357c886366a6367d7befb9c221ee4a4ac6ea5df8ad47ec3274a86e30baa7bc6e7
+
+pkgname = dashbinsh
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5d031e782720
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,17 @@
+# Maintainer: Matthew T Hoare <matthew.t.hoare at gmail dot com>
+
+pkgname=dashbinsh
+pkgver=0.1
+pkgrel=3
+pkgdesc="Relink /bin/sh to dash"
+arch=('x86_64')
+license=('GPL')
+depends=('dash')
+install="${pkgname}.install"
+source=("${pkgname}.hook")
+sha512sums=('8135b7225ff50b475321425059afc567bd54debb7a113337c442ca5394c137f357c886366a6367d7befb9c221ee4a4ac6ea5df8ad47ec3274a86e30baa7bc6e7')
+
+package() {
+ cd "$srcdir"
+ install -Dm 644 "${pkgname}.hook" "${pkgdir}/usr/share/libalpm/hooks/${pkgname}.hook"
+}
diff --git a/dashbinsh.hook b/dashbinsh.hook
new file mode 100644
index 000000000000..ed08b691bf55
--- /dev/null
+++ b/dashbinsh.hook
@@ -0,0 +1,11 @@
+[Trigger]
+Type = Package
+Operation = Install
+Operation = Upgrade
+Target = bash
+
+[Action]
+Description = Re-pointing /bin/sh symlink to dash...
+When = PostTransaction
+Exec = /usr/bin/ln -sfT dash /usr/bin/sh
+Depends = dash
diff --git a/dashbinsh.install b/dashbinsh.install
new file mode 100644
index 000000000000..fc376280f8fa
--- /dev/null
+++ b/dashbinsh.install
@@ -0,0 +1,11 @@
+post_install() {
+ /usr/bin/ln -sfT dash /usr/bin/sh
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ /usr/bin/ln -sfT bash /usr/bin/sh
+}