diff options
author | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2011-07-20 11:54:26 -0300 |
---|---|---|
committer | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2011-07-20 11:54:26 -0300 |
commit | cf6c48eb6e27c67a66587e1565f8332bb664003f (patch) | |
tree | 5d60bff2c8612159f7414277b41fd0f788e69033 /prtools/prfullpkg | |
parent | fe4eae69f86eb101ac8827306337643e208e93de (diff) | |
parent | 74f9970f154560f7f98e1126203db0cdd01bc32b (diff) |
Merge branch 'master' of ssh://vparabola/srv/git/projects/libretoolsv20110723
Diffstat (limited to 'prtools/prfullpkg')
-rwxr-xr-x | prtools/prfullpkg | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/prtools/prfullpkg b/prtools/prfullpkg index e3a022b..dd2ba3a 100755 --- a/prtools/prfullpkg +++ b/prtools/prfullpkg @@ -67,11 +67,13 @@ function get_fullver { # return : full version spec, including epoch (if necessa function cleanup { # Cleans the build_dir. - [[ "${do_cleanup}" = "n" || ! -d ${build_dir} ]] && return 0 # Do nothing or already cleaned. + [ ! -d "${build_dir}" -o "${build_only}" = 'y' ] && return 0 # Do nothing or already cleaned. - msg "Cleaning up..." - [ $level -eq 0 ] && rm -rf $build_dir/* # Only do cleanup on level 0. + if [ $level -eq 0 ]; then # Only do cleanup on level 0. + msg "Cleaning up ${build_dir}" + rm -rf "$build_dir/*" + fi } function find_deps { # Checks ABSROOT and look for target pkg deps. Adds them if not built or outdated. @@ -166,7 +168,7 @@ function find_deps { # Checks ABSROOT and look for target pkg deps. Adds them i unset next_level dir # unset PKGBUILD variables - unset pkgname pkgver pkgrel epoch pkgdesc arch url license groups depends \ + unset pkgbase pkgname pkgver pkgrel epoch pkgdesc arch url license groups depends \ makedepens checkdepends optdepends provides conflicts replaces backup \ options install changelog source noextract md5sums build check package } @@ -264,7 +266,6 @@ function trap_exit { # End inmediately but print a useful message # Trap signals from makepkg set -E -trap 'cleanup' 0 trap 'trap_exit "(prfullpkg:${level}) TERM signal caught. Exiting..."' TERM HUP QUIT trap 'trap_exit "(prfullpkg:${level}) Aborted by user! Exiting..."' INT trap 'trap_exit "(prfullpkg:${level}) An unknown error has occurred. Exiting..."' ERR @@ -314,14 +315,14 @@ fi if [ $level -eq 0 ]; then - build_dir=${build_dir:-$(mktemp -d /tmp/fullpkg.XXXXXX)} # use -d option or else mktemp - if [ ! -d ${build_dir} ]; then # in case of custom -d option mkdir -p ${build_dir} else cleanup # files already there can screw find_deps fi + build_dir=${build_dir:-$(mktemp -d /tmp/fullpkg.XXXXXX)} # use -d option or else mktemp + touch ${build_dir}/{log,BUILDORDER} ${ban_file} # make files for log and buildorder buildorder=${build_dir}/BUILDORDER |