summaryrefslogtreecommitdiff
path: root/community/tcsh/tcsh.install
blob: 023ddd11570d2f1ca175a670fae5c3aae0021bdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
}