diff options
Diffstat (limited to 'fullpkg')
-rwxr-xr-x | fullpkg | 11 |
1 files changed, 6 insertions, 5 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. @@ -31,7 +32,6 @@ usage() { echo " -a absdir : set absdir as ABSROOT." echo " -b build_dir : use a fullpkg build_dir and only build." echo " -c : check deps only, do not build." - echo " -C : cleanup the build_dir." echo " -d build_dir : use this dir to build. Defaults to mktemp." echo " -n : don't update pacman db." echo " -m max_level : check deps until this level" @@ -86,6 +86,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 +306,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 +337,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 +376,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:" |