diff options
Diffstat (limited to 'kselftest-repo-update.sh')
-rwxr-xr-x | kselftest-repo-update.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kselftest-repo-update.sh b/kselftest-repo-update.sh index 63ef33d..81cd058 100755 --- a/kselftest-repo-update.sh +++ b/kselftest-repo-update.sh @@ -21,7 +21,7 @@ checkout_branch () { else # This branch is not what we want, check out the target branch [ -z "`git branch|grep \"$1$\"`" ] && git checkout -b $1 origin/$1 || git checkout $1 - [ $? -ne 0 ] && echo "Error: Can not clone branch \"$1\"" && return 1 + [ $? -ne 0 ] && echo "Error: Can not checkout branch \"$1\"" && return 1 git pull fi return 0 @@ -36,7 +36,7 @@ clone_repo () { # The source is exist, update it pushd $3 checkout_branch $2 - popd + [ $? -eq 0 ] && popd || return 1 else # We have to clone the kernel source git clone -b $2 $1 $3 |