diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-26 09:07:45 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-26 09:07:58 +1300 |
commit | 2550842ce1e0ce8163fbf1956482292c01a6bbe4 (patch) | |
tree | 2701a5322270dbb9b967ef4abf4f1bbb78d73762 /bin | |
parent | Exclude another Perl::Critic policy (diff) | |
download | dotfiles-2550842ce1e0ce8163fbf1956482292c01a6bbe4.tar.gz dotfiles-2550842ce1e0ce8163fbf1956482292c01a6bbe4.zip |
Make rndi(1df) upper bound a little clearer
Diffstat (limited to 'bin')
-rw-r--r-- | bin/mktd.sh | 3 |
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" |