summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGarlicbreadwolfs2022-05-19 17:33:15 +0900
committerGarlicbreadwolfs2022-05-19 17:33:15 +0900
commitd023c7b391a8e41aa1dfe0ada4e8458da8ffa345 (patch)
tree464e452eebeef28db16c8bc7fab4bffb50d41afd
downloadaur-d023c7b391a8e41aa1dfe0ada4e8458da8ffa345.tar.gz
First Commit
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD19
-rw-r--r--zshbinsh.hook11
-rw-r--r--zshbinsh.install12
4 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9fcb857109c2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = zshbinsh
+ pkgdesc = Relink /bin/sh to zsh
+ pkgver = 1
+ pkgrel = 1
+ install = zshbinsh.install
+ arch = any
+ license = Unlicense
+ depends = zsh
+ provides = sh
+ conflicts = dashbinsh
+ source = zshbinsh.hook
+ sha512sums = SKIP
+
+pkgname = zshbinsh
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1efe4365d7e8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,19 @@
+# Maintainer: Garlicbreadwolfs <garlicbreadwolfs AT riseup DOT net>
+
+pkgname=zshbinsh
+pkgver=1
+pkgrel=1
+pkgdesc="Relink /bin/sh to zsh"
+arch=('any')
+license=('Unlicense')
+conflicts=('dashbinsh')
+depends=('zsh')
+provides=('sh')
+install="${pkgname}.install"
+source=("${pkgname}.hook")
+sha512sums=('SKIP')
+
+package() {
+ cd "$srcdir"
+ install -Dm 644 "${pkgname}.hook" "${pkgdir}/usr/share/libalpm/hooks/${pkgname}.hook"
+}
diff --git a/zshbinsh.hook b/zshbinsh.hook
new file mode 100644
index 000000000000..351448194972
--- /dev/null
+++ b/zshbinsh.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 zsh /usr/bin/sh
+Depends = zsh
diff --git a/zshbinsh.install b/zshbinsh.install
new file mode 100644
index 000000000000..95b7792397fd
--- /dev/null
+++ b/zshbinsh.install
@@ -0,0 +1,12 @@
+post_install() {
+ /usr/bin/ln -sfT zsh /usr/bin/sh
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ /usr/bin/ln -sfT bash /usr/bin/sh
+}
+