export TMP=/tmp/rev_control_$USER
fi
if [ ! -d "$TMP" ]; then
- mkdir $TMP
+ mkdir -p $TMP
fi
if [ ! -d "$TMP" ]; then
echo "Could not create the temporary directory TMP in: $TMP"
return 1
fi
pushd "$directory" &>/dev/null
- retval=0 # normally successful.
+ local retval=0 # normally successful.
if [ -d "CVS" ]; then
cvs ci .
retval=$?
{
local directory="$1"; shift
pushd "$directory" &>/dev/null
- retval=0 # normally successful.
+ local retval=0 # normally successful.
# only update if we see a repository living there.
if [ -d ".svn" ]; then
{
local directory="$1"; shift
pushd "$directory" &>/dev/null
- retval=0 # normally successful.
+ local retval=0 # normally successful.
# only update if we see a repository living there.
if [ -d ".svn" ]; then
# this action so far only makes sense and is needed for svn.
bash $FEISTY_MEOW_SCRIPTS/rev_control/svnapply.sh \? echo
+ retval=$?
+ elif [ -d ".git" ]; then
+ git status -u
+ retval=$?
fi
popd &>/dev/null
function squash_first_few_crs()
{
i=0
- while read line; do
+ while read input_text; do
i=$((i+1))
if [ $i -le 5 ]; then
- echo -n "$line "
+ echo -n "$input_text "
else
- echo $line
+ echo $input_text
fi
done
if [ $i -le 3 ]; then
function do_update()
{
directory="$1"; shift
- # plan on success for now.
- retval=0
+ local retval=0 # plan on success for now.
pushd "$directory" &>/dev/null
if [ -d "CVS" ]; then
cvs update . | squash_first_few_crs