Subject: [alpine-aports] [PATCH] main/zsh: simplify install files

From: Sören Tempel <[email-masked]>
Date: Sat, 8 Aug 2015 11:42:37 +0200

No version bump necessary.
---
 main/zsh/zsh.post-install  | 2 +-
 main/zsh/zsh.post-upgrade  | 4 +---
 main/zsh/zsh.pre-deinstall | 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)
 mode change 100644 => 120000 main/zsh/zsh.post-upgrade

diff --git a/main/zsh/zsh.post-install b/main/zsh/zsh.post-install
index 46506fb..d2399cd 100644
--- a/main/zsh/zsh.post-install
+++ b/main/zsh/zsh.post-install
@@ -1,3 +1,3 @@
 #!/bin/sh
-grep -q '/bin/zsh' /etc/shells || echo '/bin/zsh' >> /etc/shells
+add-shell '/bin/zsh'
 exit 0
diff --git a/main/zsh/zsh.post-upgrade b/main/zsh/zsh.post-upgrade
deleted file mode 100644
index 46506fb..0000000
--- a/main/zsh/zsh.post-upgrade
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-grep -q '/bin/zsh' /etc/shells || echo '/bin/zsh' >> /etc/shells
-exit 0
diff --git a/main/zsh/zsh.post-upgrade b/main/zsh/zsh.post-upgrade
new file mode 120000
index 0000000..fe3999f
--- /dev/null
+++ b/main/zsh/zsh.post-upgrade
@@ -0,0 +1 @@
+zsh.post-install
\ No newline at end of file
diff --git a/main/zsh/zsh.pre-deinstall b/main/zsh/zsh.pre-deinstall
index bd078e8..215f9a2 100644
--- a/main/zsh/zsh.pre-deinstall
+++ b/main/zsh/zsh.pre-deinstall
@@ -1,3 +1,3 @@
 #!/bin/sh
-sed -i '/^\/bin\/zsh/d' /etc/shells
+remove-shell '/bin/zsh'
 exit 0
-- 
2.5.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---