X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Frev_control%2Fversion_control.sh;h=432d32636c4bfb3de14efddd4f4184a5ec6fe87c;hb=d84cca001d859500e4273888332fea8ed9943f51;hp=a38d22a8f413c231eb15ccf856a4f3fb93d2f419;hpb=4eac48d4a965a0573a620c92cf12c405e3fba1c0;p=feisty_meow.git diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index a38d22a8..432d3263 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -16,7 +16,7 @@ if [[ "$TMP" =~ .:.* ]]; then 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" @@ -112,7 +112,7 @@ function do_checkin() return 1 fi pushd "$directory" &>/dev/null - retval=0 # normally successful. + local retval=0 # normally successful. if [ -d "CVS" ]; then cvs ci . retval=$? @@ -141,7 +141,7 @@ function do_diff { 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 @@ -160,12 +160,16 @@ function do_report_new { 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 @@ -193,12 +197,12 @@ function checkin_list() 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 @@ -211,8 +215,7 @@ function squash_first_few_crs() 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