aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-10-26 09:07:45 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-10-26 09:07:58 +1300
commit2550842ce1e0ce8163fbf1956482292c01a6bbe4 (patch)
tree2701a5322270dbb9b967ef4abf4f1bbb78d73762 /bin
parent5ba343e6ea76183f8f46c8ce28d36a66539a7b1d (diff)
downloaddotfiles-2550842ce1e0ce8163fbf1956482292c01a6bbe4.tar.gz
dotfiles-2550842ce1e0ce8163fbf1956482292c01a6bbe4.zip
Make rndi(1df) upper bound a little clearer
Diffstat (limited to 'bin')
-rw-r--r--bin/mktd.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/mktd.sh b/bin/mktd.sh
index 89cdc7c3..61c1b5ab 100644
--- a/bin/mktd.sh
+++ b/bin/mktd.sh
@@ -2,7 +2,8 @@
# Build the intended directory name, with the last element a random integer
# from 1..2^31
-dn=${TMPDIR:-/tmp}/${1:-mktd}.$$.$(rndi 1 2147483648)
+lim=$((2 << 31))
+dn=${TMPDIR:-/tmp}/${1:-mktd}.$$.$(rndi 1 "$e")
# Create the directory and print its name if successful
mkdir -m 700 -- "$dn" && printf '%s\n' "$dn"