diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-04-09 21:03:34 +0100 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2020-04-09 21:03:34 +0100 |
commit | e1a917b9f2db8ea62d90944739d7a9071fbc8f81 (patch) | |
tree | 9c42f4babfaaa3c186b23abdba63c658d3bd851f /subr | |
parent | 9b5d4962a3882b4634f7d05eca45626f67fcd505 (diff) | |
download | midipix_build-e1a917b9f2db8ea62d90944739d7a9071fbc8f81.tar.bz2 midipix_build-e1a917b9f2db8ea62d90944739d7a9071fbc8f81.tar.xz |
subr/rtl.subr:rtl_date(): default ${DEFAULT_TIMESTAMP_FMT} to "%Y/%m/%d %H:%M:%S".
Diffstat (limited to 'subr')
-rw-r--r-- | subr/rtl.subr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/subr/rtl.subr b/subr/rtl.subr index ef9d63ea..103d6d5d 100644 --- a/subr/rtl.subr +++ b/subr/rtl.subr @@ -3,7 +3,7 @@ # rtl_basename() { local _fname="${1##*/}"; printf "%s" "${_fname}"; }; -rtl_date() { command date "+${1:-${DEFAULT_TIMESTAMP_FMT}}"; }; +rtl_date() { command date "+${1:-${DEFAULT_TIMESTAMP_FMT:-"%Y/%m/%d %H:%M:%S"}}"; }; rtl_set_var_unsafe() { [ -n "${2}" ] && eval ${1}=\"${2}\" || return 0; }; rtl_test_cmd() { command -v "${1}" >/dev/null; }; rtl_uniq() { if [ "${#}" -gt 0 ]; then printf "%s" "${*}" | sed 's/ /\n/g' | awk '!x[$0]++' | paste -s -d" "; fi; }; |