Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pcy
sspt
Commits
c101b848
Commit
c101b848
authored
Jun 12, 2018
by
pcy
Browse files
don't rely on base32 being present
parent
0774ed6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
local/bin/sspt
View file @
c101b848
...
...
@@ -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
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment