fix exit code check (#697)
This commit is contained in:
parent
af0e165a23
commit
96dc15e167
|
@ -103,7 +103,7 @@ if [ $compare -eq 1 ]; then
|
||||||
for ((i=${#patches[@]}-1; i>=0; i--)); do
|
for ((i=${#patches[@]}-1; i>=0; i--)); do
|
||||||
f=${patches[$i]}
|
f=${patches[$i]}
|
||||||
gitApplyReverse "$f" "$basepath"
|
gitApplyReverse "$f" "$basepath"
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
unapplied+=("$f")
|
unapplied+=("$f")
|
||||||
else
|
else
|
||||||
applied+=("$f")
|
applied+=("$f")
|
||||||
|
@ -178,7 +178,7 @@ for ((i=0; i<${#patches[@]}; i++)); do
|
||||||
echo -en "\\n"
|
echo -en "\\n"
|
||||||
fi
|
fi
|
||||||
gitApply "$f" "$basepath" $verbose
|
gitApply "$f" "$basepath" $verbose
|
||||||
if [ $? -eq 1 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Failed and reverting: $f"
|
echo "Failed and reverting: $f"
|
||||||
gitApplyReverse "$f" "$basepath"
|
gitApplyReverse "$f" "$basepath"
|
||||||
echo -en "\\n"
|
echo -en "\\n"
|
||||||
|
|
Loading…
Reference in New Issue