diff options
-rwxr-xr-x | fullpkg | 23 |
1 files changed, 11 insertions, 12 deletions
@@ -274,9 +274,8 @@ function _pkg_build () { } pkgs=$(cat $build_dir/log | tr " " "\n" | grep "built:") && { - error "Those packages were built and installed:" + msg "Those packages were built and installed:" echo ${pkgs[@]} | tr " " "\n" | cut -d: -f2 - msg "Uploading packages to the server" } pkgs=$(cat $build_dir/log | tr " " "\n" | grep "failed:") && { @@ -291,7 +290,7 @@ function _pkg_build () { popd > /dev/null } -## END FUNCTIONS ## +###### END FUNCTIONS ###### force_build="" level=0 @@ -318,10 +317,19 @@ while getopts 'ha:bcCd:l:nm:r:' arg; do esac done +[ ! -r PKGBUILD ] && { + error "This isn't a build directory" + usage && exit 1 +} + +## if $level = 20 there is highly likely there are circular deps +[ $level -eq $max_level -o $level -gt $max_level ] && exit 20 + # Only on level 0 [ $level -eq 0 ] && { # if build_dir exist use it, else make a build_dir build_dir=${build_dir:-$(mktemp -d /tmp/fullpkg.XXXXXX)} + mkdir -p $build_dir # cleanup if the option was used. [ $do_cleanup == 'y' ] && { @@ -356,15 +364,6 @@ done msg "Checking dependencies" } -[ ! -r PKGBUILD ] && { - error "This isn't a build directory" - usage && exit 1 -} - -## if $level = 20 there is highly likely there are circular deps -[ $level -eq $max_level -o $level -gt $max_level ] && exit 20 - - find_deps || { # if find_deps finds circular deps # it should exit with status 20 |