37af2a
Update cli_getTemporalFile:
@@ -35,18 +35,15 @@ function cli_getTemporalFile {
|
|
35
35
|
# Check default base name for temporal file, it can't be an empty
|
36
36
|
# value.
|
37
37
|
if [[ "$NAME" == '' ]];then
|
38
|
-
cli_printMessage "`gettext "
|
38
|
+
cli_printMessage "`gettext "The first argument cannot be empty."`" --as-error-line
|
39
39
|
fi
|
40
40
|
|
41
41
|
# Define source location where temporal files will be stored.
|
42
42
|
local TMPDIR='/tmp'
|
43
43
|
|
44
|
-
# Define unique identifier for temporal file.
|
45
|
-
local UUID=$(cat /proc/sys/kernel/random/uuid)
|
46
|
-
|
47
44
|
# Define absolute path for temporal file using the program name,
|
48
45
|
# the current locale, the unique identifier and the file name.
|
49
|
-
local TMPFILE="${TMPDIR}/${CLI_PROGRAM
|
46
|
+
local TMPFILE="${TMPDIR}/${CLI_PROGRAM}-${RANDOM}-${NAME}"
|
50
47
|
|
51
48
|
# Output absolute path to final temporal file.
|
52
49
|
echo $TMPFILE
|