has not arisen in a long time for me in svn, and i would use a handy tool like kdesvn these
days rather than a script. the cvs importer allowed one to drag in vast batches of files
into a cvs archive, but i've retired most uses of cvs from my life, so... and then there are
a few little improvements for checking in and out files with checkin and getme.
#!/bin/bash
-# checks in all our commonly used folders.
-# note: fred specific.
+# checks in all the folders present in the REPOSITORY_LIST variable.
source "$FEISTY_MEOW_SCRIPTS/rev_control/rev_control.sh"
function checkin_list {
local list=$*
for i in $list; do
-echo whole list is ${REPOSITORY_LIST}
# turn repo list back into an array.
eval "repository_list=( ${REPOSITORY_LIST[*]} )"
for j in "${repository_list[@]}"; do
# add in the directory component.
j="$i/$j"
-echo here the dir thing is: $j
if [ ! -d "$j" ]; then continue; fi
pushd $j &>/dev/null
+++ /dev/null
-#!/bin/bash
-# cvs_importer: this tool does a recursive cvs add. it takes one or more
-# directory names and recursively adds them to the cvs hierarchy they are
-# currently located under (i.e., their parent directory).
-
-if [ "$#" = "0" ]; then
- echo "This program needs one or more directory names to recursively add."
- exit 23
-fi
-
-function add_cvs_dir {
- # loop across all the directories we were handed. these had better be
- # arranged in hierarchically descending order or cvs will not like adding
- # them.
- for q in $*; do
- if [ "$(basename $q)" == "CVS" ]; then
-#echo "the parameter was cvs! -> $q"
- continue;
- fi
- cvs add "$q"
-#echo "just added directory $q"
- done
-}
-
-function add_cvs_files {
- # scans through the list of directories we were given. each directory is
- # assumed to have some files which need to be added. we will add those
- # files to cvs on a per directory basis to avoid clogging up the command
- # lines and such.
- for q in $*; do
- if [ "$(basename $q)" == "CVS" ]; then
-#echo "skipping parameter as cvs! -> $q"
- continue;
- fi
-
- pushd $q &>/dev/null
- if [ $? -ne 0 ]; then
- echo "Skipping badly erroneous directory $i. Logic error?"
- continue;
- fi
-
- # add all the files in this directory, but don't do subdirectories.
- file_list=$(find . -maxdepth 1 -type f)
- # make sure there are actually some files there.
- if [ ! -z "$file_list" ]; then
- find . -maxdepth 1 -type f -exec cvs add "{}" '+'
-#echo "just added those files to $q directory"
- fi
-
- # go back to where we were before jumping into the directory.
- popd &>/dev/null
- done
-}
-
-# main activity of script occurs starting here...
-
-# loop across the directory names we were given on the command line.
-for i in $*; do
- # change into the directory just above the directory to add.
- parent_dir=$(dirname $i)
- adding_dir=$(basename $i)
- pushd $parent_dir &>/dev/null
- if [ $? -ne 0 ]; then
- echo "Skipping erroneous parent directory $parent_dir."
- continue;
- fi
-#echo dir is now: $(pwd)
-
- # find all the directories starting at the real directory to add, and add
- # cvs repositories for each of them.
- add_cvs_dir $(find $adding_dir -type d)
-
- # now add all the files, since all of the directories should be listed
- # in the cvs archive.
- add_cvs_files $(find $adding_dir -type d)
-
- # go back to the directory where we were previously.
- popd &>/dev/null
-
-done
-
+++ /dev/null
-#!/bin/bash
-# this script spiders across the first argument and locates any files that
-# should be set up as binaries. it removes the most likely wrong tags that
-# these files have after conversion from cvs (using cvs2svn).
-# we remove the executable bit because there are really very few files where
-# we want this enabled in the source tree.
-for i in `find $1 -type f -iname "*.a" \
- -o -iname "*.ansi" -o -iname "*.bat" -o -iname "*.bmp" \
- -o -iname "*.cur" -o -iname "*.dbc" -o -iname "*.dbf" \
- -o -iname "*.doc" -o -iname "*.dll" -o -iname "*.exe" \
- -o -iname "*.exp" -o -iname "*.gif" \
- -o -iname "*.gnucash" -o -iname "*.ico" -o -iname "*.jar" \
- -o -iname "*.jpg" -o -iname "*.lib" -o -iname "*.manifest" \
- -o -iname "*.mp3" \
- -o -iname "*.msi" -o -iname "*.ocx" -o -iname "*.pdf" \
- -o -iname "*.pm5" -o -iname "*.png" -o -iname "*.rtf" \
- -o -iname "*.wav" -o -iname "*.wri" -o -iname "*.vsd" \
- -o -iname "*.xcf" -o -iname "*.xls" -o -iname "*.zip" \
- `; do
- bash $SHELLDIR/svn_set_binary.sh "$i"
-done
-
#!/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
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()
{
fi
}
+# gets all the updates for a list of folders under revision control.
function checkout_list {
list=$*
for i in $list; do
done
}
+##############
+
+export TMPO_CHK=$TMP/zz_chk.log
+
rm -f "$TMPO_CHK"
# perform the checkouts as appropriate per OS.
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
+##############
+
+++ /dev/null
-#!/bin/bash
-# clean out flags that hinder files being binary.
-for i in $*; do
- echo "svn binary -> $i"
- svn pd svn:executable "$i" >/dev/null 2>&1
- svn pd svn:eol-style "$i" >/dev/null 2>&1
- svn pd svn:keywords "$i" >/dev/null 2>&1
-done
-