diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-11-04 11:23:01 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-11-04 11:23:01 -0500 |
commit | b20b7b03053f94499085a4570a241428b5676ce2 (patch) | |
tree | 6ffd4ca503c8dad561dc0592e4909e2798b9867f /src/treepkg | |
parent | a9f812439059c7f6b4d631fcf02fc2c7a7200172 (diff) |
normalize on "[[" instead of "["
Diffstat (limited to 'src/treepkg')
-rwxr-xr-x | src/treepkg | 16 |
1 files changed, 8 insertions, 8 deletions
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 |