packages/tcsh/tcsh.install
2022-05-02 23:06:43 +02:00

22 lines
484 B
Plaintext

post_install() {
# tcsh
grep -Fqx /bin/tcsh /etc/shells || echo /bin/tcsh >>/etc/shells
grep -Fqx /usr/bin/tcsh /etc/shells || echo /usr/bin/tcsh >>/etc/shells
# csh
grep -Fqx /bin/csh /etc/shells || echo /bin/csh >>/etc/shells
grep -Fqx /usr/bin/csh /etc/shells || echo /usr/bin/csh >>/etc/shells
}
post_upgrade() {
post_install
}
post_remove() {
# tcsh
sed -i -r '/^(\/usr)?\/bin\/tcsh$/d' etc/shells
# csh
sed -i -r '/^(\/usr)?\/bin\/csh$/d' etc/shells
}