Mail archive
alpine-aports

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

From: Sören Tempel <soeren+git_at_soeren-tempel.net>
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
_at_@ -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
_at_@ -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
_at_@ -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
_at_@ -1,3 +1,3 @@
 #!/bin/sh
-sed -i '/^\/bin\/zsh/d' /etc/shells
+remove-shell '/bin/zsh'
 exit 0
-- 
2.5.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sat Aug 08 2015 - 11:42:37 GMT