From 0728c2cc8c871ea6eab4df58ad4474f61fcb70af Mon Sep 17 00:00:00 2001 From: Andrea Manzini Date: Wed, 3 Oct 2018 11:40:47 +0200 Subject: [PATCH] Update makepkg.sh use mktemp to get a random build directory for safety and avoid name conflicts --- arch/makepkg.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/makepkg.sh b/arch/makepkg.sh index 2afd505..4fda732 100755 --- a/arch/makepkg.sh +++ b/arch/makepkg.sh @@ -15,7 +15,8 @@ fi sudo pacman -Syu --needed --noconfirm base base-devel git # Create a build directory in tmpfs -mkdir /tmp/build && cd "$_" +TMPDIR=$(mktemp -d) +pushd $TMPDIR ############################################################################### # XRDP @@ -35,3 +36,5 @@ mkdir /tmp/build && cd "$_" ) ############################################################################### +#remove build directory +rm -rf $TMPDIR