3 # gets any updates for the repository folders present in the REPOSITORY_LIST variable.
5 source "$FEISTY_MEOW_SCRIPTS/rev_control/rev_control.sh"
7 # trickery to ensure we can always update this file, even when the operating system has some
8 # rude behavior with regard to file locking (ahem, windows...).
9 # and even more rudeness is that the pwd and $TMP may not always be in the same form,
10 # which causes endless confusion and badness. that's why we get the pwd reading for TMP
11 # first so we can do an orange-to-orange compare.
12 tmpdir="$(cd $TMP; \pwd)"
13 if [ "$(\pwd)" != "$tmpdir" ]; then
14 if [ ! -z "$SHELL_DEBUG" ]; then
15 echo "Moving to the TMP directory to avoid file access conflicts..."
17 new_name="$TMP/zz_$(basename $0)"
18 cp -f "$0" "$new_name"
20 echo "failed to copy this script up to the TMP directory. exploit attempted?"
28 # selects the checkout method based on where we are (the host the script runs on).
35 elif [ -d ".svn" ]; then
37 elif [ -d ".git" ]; then
40 echo unknown repository for $directory...
44 # gets all the updates for a list of folders under revision control.
45 function checkout_list {
48 # turn repo list back into an array.
49 eval "repository_list=( ${REPOSITORY_LIST[*]} )"
50 for j in "${repository_list[@]}"; do
51 # add in the directory for our purposes here.
54 if [ ! -z "$SHELL_DEBUG" ]; then
55 echo "No directory called $j exists."
61 echo -n "retrieving '$j'... "
70 export TMPO_CHK=$TMP/zz_chk.log
74 # perform the checkouts as appropriate per OS.
75 if [ "$OS" != "Windows_NT" ]; then
76 checkout_list $HOME 2>&1 | tee -a "$TMPO_CHK"
78 checkout_list $HOME c:/ d:/ e:/ 2>&1 | tee -a "$TMPO_CHK"
85 # we now regenerate the scripts after getme, to ensure it's done automatically.
86 bash "$FEISTY_MEOW_SCRIPTS/core/bootstrap_shells.sh"
87 perl "$FEISTY_MEOW_SCRIPTS/core/generate_aliases.pl"