diff options
author | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-07-18 17:38:41 -0300 |
---|---|---|
committer | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-07-18 17:38:41 -0300 |
commit | 31fa75adf87d07f278e938462c4d78ebbada8a47 (patch) | |
tree | 46c6dacc28585d761e5bf6802ec0f2c057bef6c7 | |
parent | 394783a7fda0f1fb587416d54af563730bff939c (diff) |
Fixed true/false conditionals
-rwxr-xr-x | fullpkg | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1,4 +1,5 @@ #!/bin/bash +# set -x # uncomment for debug # Builds packages from ABS recursively. It tries to find dependencies that # aren't built or need update and then makepkg them in order. @@ -86,6 +87,7 @@ find_deps() { local repo=${repo:-$(guess_repo)} local pkgbase=${pkgbase:-${pkgname[0]}} +# Provide a default 0 to epoch local epoch=${epoch:-0} local fullver=$(get_fullver ${epoch} ${pkgver} ${pkgrel}) @@ -305,7 +307,7 @@ while getopts 'ha:b:cCd:l:nm:r:' arg; do esac done -if [ ! ${build_only} ]; then +if [[ ! ${build_only} ]]; then # Check if we are actually on a build directory. Do this early. if [ ! -r PKGBUILD ]; then @@ -336,14 +338,14 @@ if [ $level -eq 0 ]; then touch ${build_dir}/{log,BUILDORDER} ${ban_file} buildorder=${build_dir}/BUILDORDER - if [ ! ${noupdate} ]; then + if ! (( noupdate )); then msg "Updating pacman db and packages" sudo pacman -Syu --noconfirm || true fi - if [ ${build_only} ]; then + if (( build_only )); then msg "Build Packages" @@ -375,7 +377,7 @@ find_deps || { } # only build on level 0 -[ $check_deps_only = true -o $level -gt 0 ] && exit 0 +$( (( check_deps_only )) || [ $level -gt 0 ] ) && exit 0 msg "Building packages:" |