fix exit code check (#697)

This commit is contained in:
Caner Çıdam 2018-02-23 01:09:09 +03:00 committed by Igor Mandrigin
parent af0e165a23
commit 96dc15e167
1 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ if [ $compare -eq 1 ]; then
for ((i=${#patches[@]}-1; i>=0; i--)); do
f=${patches[$i]}
gitApplyReverse "$f" "$basepath"
if [ $? -eq 1 ]; then
if [ $? -ne 0 ]; then
unapplied+=("$f")
else
applied+=("$f")
@ -178,7 +178,7 @@ for ((i=0; i<${#patches[@]}; i++)); do
echo -en "\\n"
fi
gitApply "$f" "$basepath" $verbose
if [ $? -eq 1 ]; then
if [ $? -ne 0 ]; then
echo "Failed and reverting: $f"
gitApplyReverse "$f" "$basepath"
echo -en "\\n"