diff options
author | Arthur She <arthur.she@linaro.org> | 2014-09-18 10:26:19 -0700 |
---|---|---|
committer | Arthur She <arthur.she@linaro.org> | 2014-09-18 10:26:19 -0700 |
commit | 006c9a38ae2d45d8e3fdf8b67327f0fb3cd41204 (patch) | |
tree | 7ff5ffb7f232c182f6202ffa1e29d5040f106e8d | |
parent | 585f9c5a9320c6de8f5c5869a8cb2f5d5e564373 (diff) |
modified: 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 |