summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbackup.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/backup.sh b/backup.sh
index f4cf1de..33323b7 100755
--- a/backup.sh
+++ b/backup.sh
@@ -1,6 +1,11 @@
#!/bin/sh
BACKUP_DIR="backup-$(date +%Y%m%d_%H%M)"
+# use /tmp by default on host (this is used by tar)
+TMPDIR=${TMPDIR:-/tmp}
+export TMPDIR
+
+mkdir -p $TMPDIR
mkdir $BACKUP_DIR
cp boards.yaml $BACKUP_DIR