X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Frev_control%2Fgetme.sh;h=76f759cce36aa2b50d731d9e0a6c3f69df91aa2e;hb=a6d593934f34d35642cdc8a79421404560f89fe1;hp=58da7087086f32fa136f476c97603049745c80e1;hpb=899c242ba88efb6e4fbc621844ac6947e29fef53;p=feisty_meow.git diff --git a/scripts/rev_control/getme.sh b/scripts/rev_control/getme.sh index 58da7087..76f759cc 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 "$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,8 +21,6 @@ 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() { @@ -35,6 +37,7 @@ 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 @@ -44,7 +47,9 @@ function checkout_list { # 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 @@ -56,6 +61,10 @@ function checkout_list { done } +############## + +export TMPO_CHK=$TMP/zz_chk.log + rm -f "$TMPO_CHK" # perform the checkouts as appropriate per OS. @@ -67,9 +76,13 @@ fi less $TMPO_CHK +############## + # we now regenerate the scripts after getme, to ensure it's done automatically. bash "$FEISTY_MEOW_SCRIPTS/core/bootstrap_shells.sh" perl "$FEISTY_MEOW_SCRIPTS/core/generate_aliases.pl" echo nechung +############## +