projects
/
feisty_meow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
64d4078
)
improved return value handling
author
Chris Koeritz
<fred@gruntose.com>
Fri, 10 Nov 2017 01:52:17 +0000
(20:52 -0500)
committer
Chris Koeritz
<fred@gruntose.com>
Fri, 10 Nov 2017 01:52:17 +0000
(20:52 -0500)
scripts/rev_control/version_control.sh
patch
|
blob
|
history
diff --git
a/scripts/rev_control/version_control.sh
b/scripts/rev_control/version_control.sh
index 6a13759ce8037894a6061f12eb0099155f0b1f9e..b2346a3cae4f04165467f48c78a3348543a25121 100644
(file)
--- a/
scripts/rev_control/version_control.sh
+++ b/
scripts/rev_control/version_control.sh
@@
-87,10
+87,10
@@
function do_checkin()
if ! git diff-index --quiet HEAD --; then
# tell git about all the files and get a check-in comment.
git commit .
if ! git diff-index --quiet HEAD --; then
# tell git about all the files and get a check-in comment.
git commit .
- retval+=$?
+ let "retval = retval + $?"
fi
# catch if the diff-index failed somehow.
fi
# catch if the diff-index failed somehow.
- retval+=$?
+ let "retval = retval + $?"
local myself="$(my_branch_name)"
local parent="$(parent_branch_name)"
local myself="$(my_branch_name)"
local parent="$(parent_branch_name)"
@@
-98,11
+98,11
@@
function do_checkin()
# upload any changes to the upstream repo so others can see them.
if [ "$myself" != "$parent" ]; then
git push origin "$(myself)" 2>&1 | grep -v "X11 forwarding request failed" | $TO_SPLITTER
# upload any changes to the upstream repo so others can see them.
if [ "$myself" != "$parent" ]; then
git push origin "$(myself)" 2>&1 | grep -v "X11 forwarding request failed" | $TO_SPLITTER
- retval+=${PIPESTATUS[0]}
+ let "retval = retval + ${PIPESTATUS[0]}"
else
# this branch is the same as the parent, so just push.
git push 2>&1 | grep -v "X11 forwarding request failed" | $TO_SPLITTER
else
# this branch is the same as the parent, so just push.
git push 2>&1 | grep -v "X11 forwarding request failed" | $TO_SPLITTER
- retval+=${PIPESTATUS[0]}
+ let "retval = retval + ${PIPESTATUS[0]}"
fi
fi
fi
fi
@@
-131,13
+131,13
@@
function do_diff
# only update if we see a repository living there.
if [ -d ".svn" ]; then
svn diff .
# only update if we see a repository living there.
if [ -d ".svn" ]; then
svn diff .
- retval+=$?
+ let "retval = retval + $?"
elif [ -d ".git" ]; then
git diff
elif [ -d ".git" ]; then
git diff
- retval+=$?
+ let "retval = retval + $?"
elif [ -d "CVS" ]; then
cvs diff .
elif [ -d "CVS" ]; then
cvs diff .
- retval+=$?
+ let "retval = retval + $?"
fi
popd &>/dev/null
fi
popd &>/dev/null
@@
-281,7
+281,7
@@
function do_update()
for remote in $( git branch -r | grep -v -- '->' ); do
git branch --track ${remote#origin/} $remote
for remote in $( git branch -r | grep -v -- '->' ); do
git branch --track ${remote#origin/} $remote
- retval+=$?
+ let "retval = retval + $?"
done
#tiny bit hosed
done
#tiny bit hosed
@@
-289,15
+289,15
@@
function do_update()
# while read remote; do
# git branch --track "${remote#origin/}" "$remote"
# # ensure we notice a failure when adding tracking.
# while read remote; do
# git branch --track "${remote#origin/}" "$remote"
# # ensure we notice a failure when adding tracking.
-#
retval+=$?
+#
let "retval = retval + $?"
# done
# done
-#
retval+=${PIPESTATUS[0]}$?
+#
let "retval = retval + ${PIPESTATUS[0]}"
git fetch --all 2>&1 | grep -v "X11 forwarding request failed" | $TO_SPLITTER
git fetch --all 2>&1 | grep -v "X11 forwarding request failed" | $TO_SPLITTER
- retval+=${PIPESTATUS[0]}
+ let "retval = retval + ${PIPESTATUS[0]}"
git pull --all 2>&1 | grep -v "X11 forwarding request failed" | $TO_SPLITTER
git pull --all 2>&1 | grep -v "X11 forwarding request failed" | $TO_SPLITTER
- retval+=${PIPESTATUS[0]}
+ let "retval = retval + ${PIPESTATUS[0]}"
fi
else
# this is not an error necessarily; we'll just pretend they planned this.
fi
else
# this is not an error necessarily; we'll just pretend they planned this.