E_GSU_BAD_OPTION_TYPE invalid option type
E_GSU_BAD_ARG_COUNT invalid number of arguments
E_GSU_EDITOR failed to execute editor
+E_GSU_INVAL invalid argument
E_GSU_MKDIR failed to create directory
E_GSU_GETOPTS getopts error
E_GSU_DIALOG dialog error
E_GSU_MKTEMP mktemp error
E_GSU_MENU_TREE invalid menu tree
+E_GSU_XCMD external command failed
${gsu_errors:-}
"
local a b i=0
if [[ "${template:0:1}" != '/' ]]; then # relative path
if (($# > 1)); then
dir="$2"
- elif [[ -n "$TMPDIR" ]]; then
+ elif [[ -n "${TMPDIR:-}" ]]; then
dir="$TMPDIR"
else
dir="/tmp"