#!/bin/bash # checks in all our commonly used folders. # note: fred specific. source "$SHELLDIR/rev_control.sh" #hmmm: code here comes from getme; maybe needs abstracting. if [ "$OS" == "Windows_NT" ]; then ho=$(hostname) elif [ ! -z "$(echo $MACHTYPE | grep apple)" ]; then ho=$(hostname) elif [ ! -z "$(echo $MACHTYPE | grep suse)" ]; then ho=$(hostname --long) else ho=$(hostname) fi echo "hostname is $ho" checkin_cmd="cvs ci " use_bare_name=1 # invoke our function to check if this is a homer. is_home_system if [ "$home_system" == "true" ]; then # yes, so we need to modify the way we check in. use_bare_name=0 checkin_cmd="svn ci " fi function checkin_list { list=$* for i in $list; do for j in $i/hoople $i/inova $i/web $i/yeti ; do if [ ! -d "$j" ]; then #echo no directory called $j exists continue fi pushd $i >/dev/null if [ $use_bare_name -eq 1 ]; then folder=`basename $j` else folder=$j fi echo "checking in '$folder'..." $checkin_cmd $folder popd >/dev/null done done } if [ "$OS" != "Windows_NT" ]; then # first get individual folders. checkin_list ~ # now check in the user's directory, if that is an asset in revision control. pushd ~ >/dev/null cd .. echo "checking in '"$(pwd)"/$USER'..." $checkin_cmd $USER popd >/dev/null else checkin_list c: c:/home d: e: f: fi