From 006c9a38ae2d45d8e3fdf8b67327f0fb3cd41204 Mon Sep 17 00:00:00 2001 From: Arthur She Date: Thu, 18 Sep 2014 10:26:19 -0700 Subject: modified: kselftest-repo-update.sh --- kselftest-repo-update.sh | 4 ++-- 1 file 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 -- cgit v1.2.3