Conan_Kudo / build / midipix_build

Forked from build/midipix_build 4 years ago
Clone

Blame subr/rtl.subr

Lucio Andrés Illanes Albornoz c6d6e0
#
Lucio Andrés Illanes Albornoz e1d469
# set +o errexit -o noglob -o nounset is assumed.
Lucio Andrés Illanes Albornoz c6d6e0
#
Lucio Andrés Illanes Albornoz c6d6e0
Lucio Andrés Illanes Albornoz b6a9a1
rtl_basename() { local _fname="${1##*/}"; printf "%s" "${_fname}"; };
Lucio Andrés Illanes Albornoz e1a917
rtl_date() { command date "+${1:-${DEFAULT_TIMESTAMP_FMT:-"%Y/%m/%d %H:%M:%S"}}"; };
Lucio Andrés Illanes Albornoz 64c946
rtl_set_IFS_nl() { IFS="
Lucio Andrés Illanes Albornoz 64c946
"; };
Lucio Andrés Illanes Albornoz c6d6e0
rtl_set_var_unsafe() { [ -n "${2}" ] && eval ${1}=\"${2}\" || return 0; };
Lucio Andrés Illanes Albornoz c6d6e0
rtl_test_cmd() { command -v "${1}" >/dev/null; };
Lucio Andrés Illanes Albornoz b6a9a1
rtl_uniq() { if [ "${#}" -gt 0 ]; then printf "%s" "${*}" | sed 's/ /\n/g' | awk '!x[$0]++' | paste -s -d" "; fi; };
Lucio Andrés Illanes Albornoz c6d6e0
rtl_unset_vars() { while [ ${#} -gt 0 ]; do unset "${1}"; shift; done; };
Lucio Andrés Illanes Albornoz c6d6e0
Lucio Andrés Illanes Albornoz c6d6e0
# vim:filetype=sh