post_install() {
  grep -qe '^/bin/elvish$' etc/shells || echo '/bin/elvish' >> etc/shells
  grep -qe '^/usr/bin/elvish$' etc/shells || echo '/usr/bin/elvish' >> etc/shells
}

post_upgrade() {
  post_install
}

pre_remove() {
  sed -i -r '/^(\/usr)?\/bin\/elvish$/d' etc/shells
}

# vim:set ts=2 sw=2 et:
