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

post_upgrade() {
  post_install
}

pre_remove() {
  sed -ri '\|^/usr/bin/pwsh-preview$|d' etc/shells
}