summaryrefslogtreecommitdiff
path: root/fullpkg
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-07-20 11:54:26 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2011-07-20 11:54:26 -0300
commitcf6c48eb6e27c67a66587e1565f8332bb664003f (patch)
tree5d60bff2c8612159f7414277b41fd0f788e69033 /fullpkg
parentfe4eae69f86eb101ac8827306337643e208e93de (diff)
parent74f9970f154560f7f98e1126203db0cdd01bc32b (diff)
Merge branch 'master' of ssh://vparabola/srv/git/projects/libretoolsv20110723
Diffstat (limited to 'fullpkg')
-rwxr-xr-xfullpkg11
1 files changed, 6 insertions, 5 deletions
diff --git a/fullpkg b/fullpkg
index 43f780d..6fb580c 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.
@@ -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:"