diff options
author | Erich Eckner <git@eckner.net> | 2017-07-31 20:37:42 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-07-31 20:37:42 +0200 |
commit | 49b7939772c1e05dcf60274ba278de6e435dbe48 (patch) | |
tree | 4fb66876da0ca10a4ff3ddebece19fe72373183e | |
parent | d7a281d9820d11cc0b9b57791b419fc20d3ed68e (diff) | |
download | devtools32-49b7939772c1e05dcf60274ba278de6e435dbe48.tar.xz |
remove empty tree if "--verifysource" failed
-rw-r--r-- | makechrootpkg.in | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in index 81f69fe..13d6eb2 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -267,17 +267,12 @@ download_sources() { local copydir=$1 local makepkg_user=$2 - local builddir - builddir="$(mktemp -d)" - chmod 1777 "$builddir" + setup_workdir # Ensure sources are downloaded - sudo -u "$makepkg_user" env SRCDEST="$SRCDEST" BUILDDIR="$builddir" \ + sudo -u "$makepkg_user" 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 |