| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function cli_getTemporalFile { |
| |
| |
| if [[ $# -ne 1 ]];then |
| cli_printMessage "cli_getTemporalFile: `gettext "First argument is required."`" |
| cli_printMessage "$(caller)" 'ToKnowMoreLine' |
| fi |
| |
| |
| |
| |
| |
| local NAME="$1" |
| if [[ "$NAME" == '' ]];then |
| cli_printMessage "cli_getTemporalFile: `gettext "First argument cannot be empty."`" |
| cli_printMessage "$(caller)" 'AsToKnowMoreLine' |
| else |
| NAME="-$(basename $1)" |
| fi |
| |
| |
| local TMPDIR='/tmp' |
| |
| |
| local PREFIX='centos-art.sh-' |
| |
| |
| local UUID=$(cat /proc/sys/kernel/random/uuid) |
| |
| |
| |
| local TMPFILE=$(echo -n "${TMPDIR}/${PREFIX}${UUID}${NAME}") |
| |
| |
| echo $TMPFILE |
| |
| } |