#!/bin/bash export TMPO_CHK=$TMP/chk.log if [ "$OS" = "Windows_NT" ]; then ho=`hostname` elif [ ! -z "`echo $MACHTYPE | grep apple`" ]; then ho=`hostname` else ho=`hostname --long` fi echo "hostname is $ho" # select the checkout method based on where we are. checkout_cmd="cvs co -P -kb " modifier= homey_system= if [[ $ho == *.gruntose.blurgh ]]; then echo setting svn for home network homey_system=true checkout_cmd="svn co " modifier="svn://chandra/trunk/" elif [[ $ho == v-samurai ]]; then echo setting svn for vsam homey_system=true checkout_cmd="svn co " modifier="svn://chandra/trunk/" elif [[ $ho == v-shaggy ]]; then echo setting svn for vshag homey_system=true checkout_cmd="svn co " modifier="svn://chandra/trunk/" fi function checkout_list { list=$* for i in $list; do for j in $i/code_inova $i/hoople $i/ontrack_project $i/web $i/yeti; do # echo dir is now $j if [ ! -d $j ]; then # echo no directory called $j exists continue fi pushd $i >/dev/null $checkout_cmd $modifier`basename $j` if [ "$j" == "$i/web" -a -d "$i/web/hoople" ]; then echo "getting special hoople checkouts in web dir..." # retrieve special folders under web directory. pushd web/hoople.org >/dev/null $checkout_cmd $modifier"hoople" popd >/dev/null fi popd >/dev/null done done } if [ "$OS" != "Windows_NT" ]; then if [ "$USER" != root ]; then # normal user should support user based checkout. if [[ $checkout_cmd == *cvs* ]]; then #echo got into version for cvs. if [ ! -z "$homey_system" ]; then pushd ~ >/dev/null; cd .. ; $checkout_cmd $modifier$USER >$TMPO_CHK 2>&1 else pushd ~ >/dev/null; checkout_list ~ >$TMPO_CHK 2>&1 fi else #echo got into version for svn. pushd ~ >/dev/null; cd .. ; $checkout_cmd $modifier$USER >$TMPO_CHK 2>&1 checkout_list ~ >>$TMPO_CHK 2>&1 fi if [ -d ~/synch ]; then # get our other stuff too. echo "Traversing synch directory also..." checkout_list ~/synch >>$TMPO_CHK 2>&1 fi perl $SHELLDIR/clean_cvs_log.pl $TMPO_CHK popd >/dev/null ; less $TMPO_CHK else # root user needs modified version of list checkout. checkout_list $HOME >$TMPO_CHK 2>&1 perl $SHELLDIR/clean_cvs_log.pl $TMPO_CHK less $TMPO_CHK fi else checkout_list c:/ d:/ e:/ f:/ g:/ h:/ i:/ >$TMPO_CHK 2>&1 ; perl $SHELLDIR/clean_cvs_log.pl $TMPO_CHK ; less $TMPO_CHK fi # we now regenerate the scripts after getme, to ensure it's done automatically. perl $SHELLDIR/generate_aliases.pl perl $SHELLDIR/copy_variables.pl nechung