summaryrefslogtreecommitdiffstats
path: root/build/install-build-deps.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build/install-build-deps.sh')
-rwxr-xr-xbuild/install-build-deps.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/build/install-build-deps.sh b/build/install-build-deps.sh
index b721604..673e8c8 100755
--- a/build/install-build-deps.sh
+++ b/build/install-build-deps.sh
@@ -4,6 +4,16 @@
# and http://code.google.com/p/chromium/wiki/LinuxBuild64Bit
set -ex
+# Root can't access files on all filesystems, but /tmp should always be ok
+# (unless it's full).
+DIR=`mktemp -d`
+cd $DIR
+touch .created
+
+cleanup() {
+ test -f $DIR/.created && rm -rf $DIR
+}
+
# TODO(dkegel): add sha1sum verification
download() {
dir=$1
@@ -95,6 +105,8 @@ then
install_hardy_64
else
echo "Unsupported system"
+ cleanup
exit 1
fi
+cleanup