#!/bin/bash

#@DOC@ Set up a new computer

cvs=`type -p cvs`
ssh=`type -p ssh`
if [[ ! -x $cvs || ! -x $ssh ]] ; then
	echo ""
	echo "Installing CVS..."
	echo "(You will need to enter local machine password for sudo)"
	sudo apt-get install cvs ssh
fi

cd $HOME
mkdir -p bin
#echo "#!/bin/bash" > bin/myssh_bootstrap
#echo "exec /usr/bin/ssh -oHostKeyAlgorithms=+ssh-dss \"\$@\"" >> bin/myssh_bootstrap
#chmod a+x bin/myssh_bootstrap

#export CVS_RSH=$HOME/bin/myssh_bootstrap
export CVS_RSH=ssh
export CVSROOT=:ext:acorn@shell2.rawbw.com:/home/users/acorn/cvsroot
echo ""
echo "About to cvs checkout mybin...  You will need your rawbw password."
cvs checkout mybin
cd mybin && bash ./bootstrap
