1 2 3 4 5 6 7 8 9 10 11 12
post_install() { grep -Fqx /bin/pwsh /etc/shells || echo /bin/pwsh >>/etc/shells grep -Fqx /usr/bin/pwsh /etc/shells || echo /usr/bin/pwsh >>/etc/shells } post_upgrade() { post_install } post_remove() { sed -i -r '/^(\/usr)?\/bin\/pwsh$/d' etc/shells }