$gsu_errors
EOF
}
-export -f _gsu_init_errors
# check if $1 is a number
gsu_is_a_number()
ret=-$E_GSU_NOT_A_NUMBER
fi
}
-export -f gsu_is_a_number
gsu_short_msg()
{
echo "$1" 1>&2
}
-export -f gsu_short_msg
gsu_msg()
{
gsu_short_msg "$_gsu_self: $1"
}
-export -f gsu_msg
gsu_date_msg()
{
gsu_short_msg "$_gsu_self $(date): $1"
}
-export -f gsu_date_msg
gsu_err_msg()
{
fi
gsu_msg "$txt"
}
-export -f gsu_err_msg
_gsu_setup()
{
gsu_config_var_prefix="${gsu_config_var_prefix:=$gsu_name}"
_gsu_init_errors
}
-export -f _gsu_setup
done
ret=$GSU_SUCCESS
}
-export -f gsu_check_options
# Call gsu_check_options(), die on errors.
gsu_check_options_or_die()
{
gsu_short_msg "# Usage: $_gsu_self command [options]"
}
-export -f _gsu_usage
# Each line matching this is recognized as a subcommand. The name
# of the subcommand is the first subexpression.
sed -ne "s/$gsu_command_regex/\1/g;T;p" $0
} | sort | tr '\n' ' ')"
}
-export -f _gsu_available_commands
_gsu_print_available_commands()
{(
echo
) 2>&1
}
-export -f _gsu_print_available_commands
export gsu_prefs_txt="
Print the current preferences.
echo
done
}
-export -f _com_prefs
export gsu_man_txt="
Print the manual.
done
ret=$GSU_SUCCESS
}
-export -f _com_man
_gsu_banner_msg()
{
fi
gsu_short_msg "$txt ###"
}
-export -f _gsu_banner_msg
export gsu_help_txt="
Print online help.
result="$1"
ret=-$E_GSU_BAD_COMMAND
}
-export -f _com_help
# Wrapper for bash's getopts.
#
"
ret=$GSU_SUCCESS
}
-export -f gsu_getopts
gsu()
{
_gsu_print_available_commands
exit 1
}
-export -f gsu
# Check number of arguments.
#
[[ $1 -gt $3 ]] && return
ret=$GSU_SUCCESS
}
-export -f gsu_check_arg_count
-