From 31fa75adf87d07f278e938462c4d78ebbada8a47 Mon Sep 17 00:00:00 2001 From: Nicolas Reynolds Date: Mon, 18 Jul 2011 17:38:41 -0300 Subject: Fixed true/false conditionals --- fullpkg | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'fullpkg') diff --git a/fullpkg b/fullpkg index 43f780d..ff01507 100755 --- a/fullpkg +++ b/fullpkg @@ -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:" -- cgit v1.2.3-54-g00ecf