#!/bin/bash # Replaces a slave user's .bashrc, .bash_profile, & .bash_logout files # with a link to the master user's corresponding files and creates a link from # the master user's ~/bin directory to slave's ~/bin/master # # See http://toddgee.com/node/35 # See http://toddgee.com/node/34 # # Note: If you are setting up a new _user/_web pair of users, # see the setupUserPair.sh script instead. if [ $# -ne 1 ]; then echo "Usage $0 " exit 1 fi /bin/rm -f ~/.bashrc ~/.bash_profile ~/.bash_logout ln -s /home/${1}/.bashrc . ln -s /home/${1}/.bash_profile . ln -s /home/${1}/.bash_logout . if [ ! -d bin ]; then mkdir bin fi cd ~/bin /bin/rm -f ./master ln -s /home/${1}/bin ./master