X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Frev_control%2Fgetme.sh;h=a5b244c046d7c1b80ce848cf3af56a52e3ed727d;hb=068a293d75c9b3bfe11489d062a7d20a6be9ddaa;hp=bd1edc4a8496564340a9021cb5cb0c9160f27cc4;hpb=ef9fa75369c57548fe41e5ce3724b7f7c40b983c;p=feisty_meow.git diff --git a/scripts/rev_control/getme.sh b/scripts/rev_control/getme.sh index bd1edc4a..a5b244c0 100644 --- a/scripts/rev_control/getme.sh +++ b/scripts/rev_control/getme.sh @@ -1,11 +1,15 @@ #!/bin/bash -# gets all of fred's revision control folders out. +# gets any updates for the repository folders present in the REPOSITORY_LIST variable. -source "$SHELLDIR/rev_control/rev_control.sh" +source "$FEISTY_MEOW_SCRIPTS/rev_control/rev_control.sh" +# trickery to ensure we can always update this file, even when the operating system has some +# rude behavior with regard to file locking (ahem, windows...). if [ "$(pwd)" != "$TMP" ]; then -# echo "Moving to the TMP directory to avoid file access conflicts..." + if [ ! -z "$SHELL_DEBUG" ]; then + echo "Moving to the TMP directory to avoid file access conflicts..." + fi new_name="$TMP/zz_$(basename $0)" cp -f "$0" "$new_name" if [ $? -ne 0 ]; then @@ -17,15 +21,13 @@ if [ "$(pwd)" != "$TMP" ]; then exec "$new_name" fi -export TMPO_CHK=$TMP/zz_chk.log - # selects the checkout method based on where we are (the host the script runs on). function do_update() { directory="$1"; shift if [ -d "CVS" ]; then - cvs co -P -kb "$directory" + cvs update . elif [ -d ".svn" ]; then svn update . elif [ -d ".git" ]; then @@ -35,13 +37,19 @@ function do_update() fi } +# gets all the updates for a list of folders under revision control. function checkout_list { list=$* for i in $list; do -#this list should be part of the configuration file, not part of script. - for j in $i/feisty_meow $i/hoople $i/hoople1 $i/hoople2 $i/quartz $i/web $i/yeti $i/xsede/xsede_tests $i/xsede/code/cak0l/trunk ; do + # turn repo list back into an array. + eval "repository_list=( ${REPOSITORY_LIST[*]} )" + for j in "${repository_list[@]}"; do + # add in the directory for our purposes here. + j="$i/$j" if [ ! -d $j ]; then -# echo no directory called $j exists + if [ ! -z "$SHELL_DEBUG" ]; then + echo "No directory called $j exists." + fi continue fi @@ -53,20 +61,28 @@ function checkout_list { done } +############## + +export TMPO_CHK=$TMP/zz_chk.log + rm -f "$TMPO_CHK" # perform the checkouts as appropriate per OS. if [ "$OS" != "Windows_NT" ]; then checkout_list $HOME 2>&1 | tee -a "$TMPO_CHK" else - checkout_list c:/ c:/home d:/ d:/home e:/ e:/home f:/ f:/home g:/ g:/home h:/ h:/home i:/ i:/home 2>&1 | tee -a "$TMPO_CHK" + checkout_list $HOME c:/ d:/ e:/ f:/ g:/ h:/ i:/ 2>&1 | tee -a "$TMPO_CHK" fi less $TMPO_CHK +############## + # we now regenerate the scripts after getme, to ensure it's done automatically. -bash "$SHELLDIR/core/bootstrap_shells.sh" -perl "$SHELLDIR/core/generate_aliases.pl" +bash "$FEISTY_MEOW_SCRIPTS/core/bootstrap_shells.sh" +perl "$FEISTY_MEOW_SCRIPTS/core/generate_aliases.pl" echo nechung +############## +