summaryrefslogtreecommitdiff
path: root/community/tcsh/tcsh.install
diff options
context:
space:
mode:
Diffstat (limited to 'community/tcsh/tcsh.install')
-rw-r--r--community/tcsh/tcsh.install25
1 files changed, 25 insertions, 0 deletions
diff --git a/community/tcsh/tcsh.install b/community/tcsh/tcsh.install
new file mode 100644
index 000000000..023ddd115
--- /dev/null
+++ b/community/tcsh/tcsh.install
@@ -0,0 +1,25 @@
+post_install() {
+ if [ ! "`grep /bin/tcsh etc/shells`" ]; then
+ echo "updating /etc/shells... done."
+ sed -i "s|/bin/bash|/bin/bash\n/bin/tcsh\n/bin/csh|" etc/shells
+ else
+ sed -i "s|/usr/bin/tcsh|/bin/tcsh|" etc/shells
+ sed -i "s|/usr/bin/csh|/bin/csh|" etc/shells
+
+ echo ""
+ echo ">> WARNING: /usr/bin/tcsh has moved to /bin/tcsh,"
+ echo ">> WARNING: /usr/bin/csh has moved to /bin/csh,"
+ echo ">> please update your user accounts as needed"
+ echo ""
+ fi
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ echo "updating /etc/shells... done."
+ sed -i "\|/bin/tcsh|d" etc/shells
+ sed -i "\|/bin/csh|d" etc/shells
+}