From b20b7b03053f94499085a4570a241428b5676ce2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 4 Nov 2013 11:23:01 -0500 Subject: normalize on "[[" instead of "[" --- src/treepkg | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/treepkg') diff --git a/src/treepkg b/src/treepkg index 6dc9dda..0f6d605 100755 --- a/src/treepkg +++ b/src/treepkg @@ -59,10 +59,10 @@ bury() { # If there's a depth or the package is not the root of the build tree (which # can lead to funny chicken-and-egg problems), update the depth to the current # package next-depth and rename the dir too - if [ -z "${current_depth}" ]; then return; fi - if [ -z "${current_name}" ]; then return; fi - if [ ${current_depth} -eq 0 ]; then return; fi - if [ ${current_depth} -ge $2 ]; then return; fi + if [[ -z "${current_depth}" ]]; then return; fi + if [[ -z "${current_name}" ]]; then return; fi + if [[ ${current_depth} -eq 0 ]]; then return; fi + if [[ ${current_depth} -ge $2 ]]; then return; fi ${VERBOSE} && msg "Burying ${1} from ${current_depth} to ${2}" @@ -78,7 +78,7 @@ guess_repo() { basename "$(dirname "${1}")" } -if [ ! -f PKGBUILD ]; then +if [[ ! -f PKGBUILD ]]; then error "Missing PKGBUILD (%s)" "$PWD" exit 1 fi @@ -175,7 +175,7 @@ if ! ${BUILDNOW}; then fi # Only build at the end -if [ ${DEPTH} -eq 0 ]; then +if [[ ${DEPTH} -eq 0 ]]; then ${VERBOSE} && msg "Starting build" || true if ${BUILD}; then @@ -185,9 +185,9 @@ if [ ${DEPTH} -eq 0 ]; then # The reverse order ensures we start by the deepest packages for _pkg in $(ls -r "${BUILDDIR}"); do # Ignore if there's no PKGBUILD - if [ ! -f "${BUILDDIR}/${_pkg}/PKGBUILD" ]; then continue; fi + if [[ ! -f "${BUILDDIR}/${_pkg}/PKGBUILD" ]]; then continue; fi # Skip if already built (faster than calling is_build again) - if [ -f "${BUILDDIR}/${_pkg}/built_ok" ]; then continue; fi + if [[ -f "${BUILDDIR}/${_pkg}/built_ok" ]]; then continue; fi ${VERBOSE} && msg "Building %s" "${_pkg/_/ }" || true -- cgit v1.2.3-54-g00ecf