summarylogtreecommitdiffstats
path: root/fish.install
diff options
context:
space:
mode:
Diffstat (limited to 'fish.install')
-rw-r--r--fish.install20
1 files changed, 20 insertions, 0 deletions
diff --git a/fish.install b/fish.install
new file mode 100644
index 00000000000..f5016fcb568
--- /dev/null
+++ b/fish.install
@@ -0,0 +1,20 @@
+post_install() {
+ if [ ! "`grep /usr/bin/fish etc/shells`" ]; then
+ echo "updating /etc/shells... done."
+ sed -i "s|/bin/bash|/bin/bash\n/usr/bin/fish|" etc/shells
+ fi
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ echo -ne "updating /etc/shells... \n"
+ sed -i '/^\/usr\/bin\/fish/d' /etc/shells
+}
+
+op=$1
+shift
+
+$op $*