diff options
author | Erich Eckner <git@eckner.net> | 2017-07-31 20:37:42 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-03-24 21:36:35 +0100 |
commit | 82681ecb4f443d8ec333848c9c0388acd43c186a (patch) | |
tree | 28e764c7cd5dbcd7232e3c1248735fb920f335b6 /makechrootpkg.in | |
parent | bc98dac589ac358bd805f793ad9c1286659b5d73 (diff) | |
download | devtools32-82681ecb4f443d8ec333848c9c0388acd43c186a.tar.xz |
remove empty tree if "--verifysource" failed
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r-- | makechrootpkg.in | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in index f67489e..032ffc5 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -248,18 +248,14 @@ download_sources() { local copydir=$1 local makepkg_user=$2 - local builddir - builddir="$(mktemp -d)" - chown "$makepkg_user:$makepkg_user" "$builddir" + setup_workdir + chown "$makepkg_user:$makepkg_user" "$WORKDIR" # Ensure sources are downloaded sudo -u "$makepkg_user" --preserve-env=GNUPGHOME \ - env SRCDEST="$SRCDEST" BUILDDIR="$builddir" \ + env SRCDEST="$SRCDEST" BUILDDIR="$WORKDIR" \ makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o || die "Could not download sources." - - # Clean up garbage from verifysource - rm -rf "$builddir" } # Usage: move_products $copydir $owner |