summaryrefslogtreecommitdiff
path: root/fullpkg
diff options
context:
space:
mode:
Diffstat (limited to 'fullpkg')
-rwxr-xr-xfullpkg10
1 files changed, 6 insertions, 4 deletions
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:"