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