add gsh-bin.install file

This commit is contained in:
Kun Chen 2025-01-20 15:00:33 -08:00
parent 850f059e19
commit 7c78f2d02f

14
gsh-bin.install Normal file
View file

@ -0,0 +1,14 @@
#!/bin/sh
post_install() {
grep -qe '^/bin/gsh$' etc/shells || echo '/bin/gsh' >> etc/shells
grep -qe '^/usr/bin/gsh$' etc/shells || echo '/usr/bin/gsh' >> etc/shells
}
post_upgrade() {
post_install
}
pre_remove() {
sed -i -r '/^(\/usr)?\/bin\/gsh$/d' etc/shells
}