Pull extra/fish fish.install

This commit is contained in:
Akatsuki Rui
2024-10-16 16:30:30 +00:00
parent e5382ada9c
commit d3765aa5fe
3 changed files with 7 additions and 13 deletions

View File

@@ -1,20 +1,14 @@
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
grep -qe '^/usr/bin/fish$' etc/shells || echo '/usr/bin/fish' >> etc/shells
grep -qe '^/bin/fish$' etc/shells || echo '/bin/fish' >> etc/shells
}
post_upgrade() {
post_install $1
post_install
}
pre_remove() {
echo -ne "updating /etc/shells... \n"
sed -i '/^\/usr\/bin\/fish/d' /etc/shells
sed -ri -e '\|^/usr/bin/fish$|d' -e '\|^/bin/fish$|d' etc/shells
}
op=$1
shift
$op $*
# vim:set ts=2 sw=2 et: