Commit c101b848 authored by pcy's avatar pcy
Browse files

don't rely on base32 being present

parent 0774ed6d
......@@ -31,7 +31,11 @@ escape_string() {
}
export -f escape_string
temp_filename() {
echo "/tmp/sspt-$(head -c 4 /dev/urandom | base32)"
if command -v base32 >/dev/null 2>&1; then
echo "/tmp/sspt-$(head -c 4 /dev/urandom | base32)"
else
echo "/tmp/sspt-$(head -c 4 /dev/urandom | hexdump | head -1 | tr -d ' ')"
fi
}
export -f temp_filename
file_exists_glob() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment