Commit 03b674bc authored by Ismo Puustinen's avatar Ismo Puustinen

verify-godeps: change redirection order.

In code "popd 2>&1 > /dev/null" the stderr output goes to the terminal instead of /dev/null, which is clearly the intention. Change the order to fix this in four places. Also, while at it, change one incorrect comparison to use "-gt" instead of ">" in the same file.
parent 6372bb2f
...@@ -65,7 +65,7 @@ _kubetmp="${_kubetmp}/kubernetes" ...@@ -65,7 +65,7 @@ _kubetmp="${_kubetmp}/kubernetes"
# Do all our work in the new GOPATH # Do all our work in the new GOPATH
export GOPATH="${_tmpdir}" export GOPATH="${_tmpdir}"
pushd "${_kubetmp}" 2>&1 > /dev/null pushd "${_kubetmp}" > /dev/null 2>&1
# Restore the Godeps into our temp directory # Restore the Godeps into our temp directory
hack/godep-restore.sh hack/godep-restore.sh
...@@ -78,11 +78,11 @@ pushd "${_kubetmp}" 2>&1 > /dev/null ...@@ -78,11 +78,11 @@ pushd "${_kubetmp}" 2>&1 > /dev/null
# Recreate the Godeps using the nice clean set we just downloaded # Recreate the Godeps using the nice clean set we just downloaded
hack/godep-save.sh hack/godep-save.sh
popd 2>&1 > /dev/null popd > /dev/null 2>&1
ret=0 ret=0
pushd "${KUBE_ROOT}" 2>&1 > /dev/null pushd "${KUBE_ROOT}" > /dev/null 2>&1
# Test for diffs # Test for diffs
if ! _out="$(diff -Naupr --ignore-matching-lines='^\s*\"GoVersion\":' --ignore-matching-line='^\s*\"GodepVersion\":' --ignore-matching-lines='^\s*\"Comment\":' Godeps/Godeps.json ${_kubetmp}/Godeps/Godeps.json)"; then if ! _out="$(diff -Naupr --ignore-matching-lines='^\s*\"GoVersion\":' --ignore-matching-line='^\s*\"GodepVersion\":' --ignore-matching-lines='^\s*\"Comment\":' Godeps/Godeps.json ${_kubetmp}/Godeps/Godeps.json)"; then
echo "Your Godeps.json is different:" >&2 echo "Your Godeps.json is different:" >&2
...@@ -117,9 +117,9 @@ pushd "${KUBE_ROOT}" 2>&1 > /dev/null ...@@ -117,9 +117,9 @@ pushd "${KUBE_ROOT}" 2>&1 > /dev/null
fi fi
ret=1 ret=1
fi fi
popd 2>&1 > /dev/null popd > /dev/null 2>&1
if [[ ${ret} > 0 ]]; then if [[ ${ret} -gt 0 ]]; then
exit ${ret} exit ${ret}
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment