aboutsummaryrefslogtreecommitdiff
path: root/build/tools
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2010-06-01 11:31:20 -0700
committerDavid 'Digit' Turner <digit@google.com>2010-06-01 11:34:02 -0700
commit24f3d9e99d26d478caf1f1c287bd95687e6cba64 (patch)
treeeb8f456a06f4f244e29d44d4e18a3b2a73e07487 /build/tools
parenteae38344a15b28c9a6f5c77b7c326776af06aad7 (diff)
downloadndk-24f3d9e99d26d478caf1f1c287bd95687e6cba64.tar.gz
ndk/build/tools: fix improper mktemp usage
Change-Id: I592b025ebdf2181a80f5c7014fb40d3cdcd8e2ca
Diffstat (limited to 'build/tools')
-rwxr-xr-xbuild/tools/build-ccache.sh2
-rwxr-xr-xbuild/tools/build-gcc.sh2
-rwxr-xr-xbuild/tools/build-gdbserver.sh2
-rw-r--r--build/tools/prebuilt-common.sh5
-rwxr-xr-xbuild/tools/rebuild-all-prebuilt.sh2
5 files changed, 9 insertions, 4 deletions
diff --git a/build/tools/build-ccache.sh b/build/tools/build-ccache.sh
index 51fe5e5d4..b06e0a339 100755
--- a/build/tools/build-ccache.sh
+++ b/build/tools/build-ccache.sh
@@ -38,7 +38,7 @@ CCACHE_URL=$DOWNLOAD_ROOT/$CCACHE_PACKAGE
OPTION_PACKAGE=no
-BUILD_OUT=`mktemp -d /tmp/ndk-toolchain-XXX`
+BUILD_OUT=`random_temp_directory`
OPTION_BUILD_OUT=
OPTION_FROM=
diff --git a/build/tools/build-gcc.sh b/build/tools/build-gcc.sh
index 2ac0d2efc..689d876cc 100755
--- a/build/tools/build-gcc.sh
+++ b/build/tools/build-gcc.sh
@@ -32,7 +32,7 @@ the toolchain to use (e.g. arm-eabi-4.4.0)."
JOBS=$HOST_NUM_CPUS
RELEASE=`date +%Y%m%d`
-BUILD_OUT=`mktemp -d /tmp/ndk-toolchain-XXX`
+BUILD_OUT=`random_temp_directory`
PLATFORM=android-3
GDB_VERSION=6.6
BINUTILS_VERSION=2.19
diff --git a/build/tools/build-gdbserver.sh b/build/tools/build-gdbserver.sh
index 2bfc7b210..85eca236f 100755
--- a/build/tools/build-gdbserver.sh
+++ b/build/tools/build-gdbserver.sh
@@ -33,7 +33,7 @@ is the name of the toolchain to use (e.g. arm-eabi-4.4.0).
NOTE: The --platform option is ignored if --sysroot is used."
RELEASE=`date +%Y%m%d`
-BUILD_OUT=`mktemp -d /tmp/ndk-toolchain-XXX`
+BUILD_OUT=`random_temp_directory`
PLATFORM=android-3
VERBOSE=no
JOBS=$HOST_NUM_CPUS
diff --git a/build/tools/prebuilt-common.sh b/build/tools/prebuilt-common.sh
index 44a518eb0..cd53e4e45 100644
--- a/build/tools/prebuilt-common.sh
+++ b/build/tools/prebuilt-common.sh
@@ -424,3 +424,8 @@ check_toolchain_install ()
set_toolchain_install $TOOLCHAIN_PATH
}
+
+random_temp_directory ()
+{
+ mktemp -d /tmp/ndk-toolchain-XXXXXX
+}
diff --git a/build/tools/rebuild-all-prebuilt.sh b/build/tools/rebuild-all-prebuilt.sh
index 22a1334ab..46d780dfc 100755
--- a/build/tools/rebuild-all-prebuilt.sh
+++ b/build/tools/rebuild-all-prebuilt.sh
@@ -36,7 +36,7 @@ NDK_DIR=$ANDROID_NDK_ROOT
register_option "--ndk-dir=<path>" do_ndk_dir "Specify target NDK directory" "$NDK_DIR"
do_ndk_dir () { OPTION_NDK_DIR=$1; }
-BUILD_DIR=`mktemp -d /tmp/ndk-prebuilt-XXX`
+BUILD_DIR=`random_temp_directory`
OPTION_BUILD_DIR=
register_option "--build-dir=<path>" do_build_dir "Specify temporary build directory" "/tmp/<random>"
do_build_dir () { OPTION_BUILD_DIR=$1; }