aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cache-sample.sh2
-rwxr-xr-xbin/disks-sample.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/bin/cache-sample.sh b/bin/cache-sample.sh
index cac8911..202bc63 100755
--- a/bin/cache-sample.sh
+++ b/bin/cache-sample.sh
@@ -11,11 +11,11 @@ CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/udt"
CACHE="$CACHE_DIR/cachesize.txt"
TARGET="${XDG_CACHE_HOME:-$HOME/.cache}"
+umask 077
mkdir -p "$CACHE_DIR"
TMP="$CACHE.tmp.$$"
trap 'rm -f "$TMP"' EXIT
-umask 077
# Total first, then the four largest children. `sort -h` compares human sizes
# numerically; the Lua side converts them again because it needs the ratio to
diff --git a/bin/disks-sample.sh b/bin/disks-sample.sh
index 83b8a62..5291bcf 100755
--- a/bin/disks-sample.sh
+++ b/bin/disks-sample.sh
@@ -16,11 +16,11 @@ CACHE="$CACHE_DIR/disks.txt"
MOUNTS=(/ /home /data /mnt/nfs/Library /mnt/nfs/shared)
+umask 077
mkdir -p "$CACHE_DIR"
TMP="$CACHE.tmp.$$"
trap 'rm -f "$TMP"' EXIT
-umask 077
# /usr/bin/df by absolute path with -P -B1, deliberately:
# - the user's shell aliases df to `df -h`, and an alias or a function would