aboutsummaryrefslogtreecommitdiff
path: root/linaro-hwpack-install
diff options
context:
space:
mode:
authorGeorgy Redkozubov <georgy.redkozubov@linaro.org>2011-12-06 07:35:46 +0400
committerGeorgy Redkozubov <georgy.redkozubov@linaro.org>2011-12-06 07:35:46 +0400
commitcd79ad93137e0040d88a85154c59d58a063de76d (patch)
tree946422561bdbd3cffcaf977257351911fcf4c86e /linaro-hwpack-install
parent3fcb91b6f2b21110985864ad846b1fb46d6431dc (diff)
Added warning message to the user about unsetting TMPDIR variable. In chroot environment it likely doesn't exist and can lead to error messages
Diffstat (limited to 'linaro-hwpack-install')
-rwxr-xr-xlinaro-hwpack-install6
1 files changed, 5 insertions, 1 deletions
diff --git a/linaro-hwpack-install b/linaro-hwpack-install
index b13dc31..54acd88 100755
--- a/linaro-hwpack-install
+++ b/linaro-hwpack-install
@@ -29,7 +29,11 @@
set -e
-unset TMPDIR
+if [ -n "${TMPDIR+x}" ]; then
+ echo -e "\nWARNING: TMPDIR variable is set. It will be unset because in chroot environment it likely doesn't exist and can lead to error messages.\n"
+ unset TMPDIR
+fi
+
LOCKFILE="/var/lock/hwpack"
TEMP_DIR=$(mktemp -d)
HWPACK_DIR="${TEMP_DIR}/unpacked"