summarylogtreecommitdiffstats
path: root/fish.install
blob: f5016fcb568342aa15bf5d7a4670f8a991d9cd73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 $*