aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Ferrell <major@homeonderanged.org>2013-09-19 08:51:41 -0700
committerMark Ferrell <major@homeonderanged.org>2013-09-19 08:51:41 -0700
commit3f38163eddca0be6dd5a01c7cf5f502ef4c73d9c (patch)
treea6497482dfa9e161748767120b9f4a862fef8d69
parent951253dcbe82d3ed6178c0f9ca966ba033036693 (diff)
Unspecialize tmp
* Stop creating paths outside of BUILDER_TOPDIR. If a user wants a special tmp, such as one in tmpfs, they can make a symlink into /tmp or mount tmpfs inside of their build tree.
-rwxr-xr-xscripts/build15
1 files changed, 5 insertions, 10 deletions
diff --git a/scripts/build b/scripts/build
index 5635df4..2533681 100755
--- a/scripts/build
+++ b/scripts/build
@@ -214,18 +214,13 @@ BUILDER_SRCDIR="${TOPDIR}/sources"
BUILDER_ATFDIR="${TOPDIR}/artifacts"
BUILDER_LIBDIR="${TOPDIR}/scripts/builder"
-BUILDER_TMPDIR=
-for dir in "${TMP}" "${TMPDIR}" "/tmp"; do
- if test -d "${dir}"; then
- BUILDER_TMPDIR="${dir}/.builder_${USER}"
- if ! test -d "${BUILDER_TMPDIR}"; then
- mkdir -p "${BUILDER_TMPDIR}"
- fi
- fi
-done
-
export BUILDER_CFGDIR BUILDER_PKGDIR BUILDER_SRCDIR
export BUILDER_ATFDIR BUILDER_LIBDIR BUILDER_TOPDIR
+
+BUILDER_TMPDIR="${TOPDIR}/tmp"
+if ! test -d "${BUILDER_TMPDIR}"; then
+ mkdir -p "${BUILDER_TMPDIR}"
+fi
export BUILDER_TMPDIR
# We save the pre-config PATH as BUILDER_PATH to be used by downstream tools.