#!/bin/sh
# setup commands for first terminal session
BIRCH=/home/psgendb
export BIRCH
echo Setting up .login file
cat $BIRCH/admin/add_to_login >> $HOME/.login
chmod 700 $HOME/.login

echo Setting up .cshrc file
cat $BIRCH/admin/add_to_cshrc >> $HOME/.cshrc
chmod 700 $HOME/.cshrc

if [ -f $HOME/.tcshrc ]
   then
     echo Setting up .tcshrc file
     cat $BIRCH/admin/add_to_cshrc >> $HOME/.tcshrc
     chmod 700 $HOME/.tcshrc
fi

echo Setting up .profile file
cat $BIRCH/admin/add_to_profile >> $HOME/.profile
chmod 700 $HOME/.profile

echo Setting up .bash_profile file
cat $BIRCH/admin/add_to_profile >> $HOME/.bash_profile
chmod 700 $HOME/.bash_profile

echo Setting up .bash_login file
cat $BIRCH/admin/add_to_profile >> $HOME/.bash_login
chmod 700 $HOME/.bash_login

echo Setting up .bashrc file
cat $BIRCH/admin/add_to_profile >> $HOME/.bashrc
chmod 700 $HOME/.bashrc

echo Setting up .zshenv file
cat $BIRCH/admin/add_to_profile >> $HOME/.zshenv
chmod 700 $HOME/.zshenv


# Setup a .vnc directory for the user.
# Nothing is done unless there is a $BIRCH/local/admin/xstartup file.
$BIRCH/script/vncsetup

echo Done!
echo Logout and login again so that the changes can take effect.
