summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d84fb61)
This is no longer necessary now that all gsu scripts include the gsu
shell library directly.
-export -f _gsu_init_errors
# check if $1 is a number
gsu_is_a_number()
# check if $1 is a number
gsu_is_a_number()
ret=-$E_GSU_NOT_A_NUMBER
fi
}
ret=-$E_GSU_NOT_A_NUMBER
fi
}
-export -f gsu_is_a_number
gsu_short_msg()
{
echo "$1" 1>&2
}
gsu_short_msg()
{
echo "$1" 1>&2
}
gsu_msg()
{
gsu_short_msg "$_gsu_self: $1"
}
gsu_msg()
{
gsu_short_msg "$_gsu_self: $1"
}
gsu_date_msg()
{
gsu_short_msg "$_gsu_self $(date): $1"
}
gsu_date_msg()
{
gsu_short_msg "$_gsu_self $(date): $1"
}
gsu_config_var_prefix="${gsu_config_var_prefix:=$gsu_name}"
_gsu_init_errors
}
gsu_config_var_prefix="${gsu_config_var_prefix:=$gsu_name}"
_gsu_init_errors
}
-export -f gsu_check_options
# Call gsu_check_options(), die on errors.
gsu_check_options_or_die()
# Call gsu_check_options(), die on errors.
gsu_check_options_or_die()
{
gsu_short_msg "# Usage: $_gsu_self command [options]"
}
{
gsu_short_msg "# Usage: $_gsu_self command [options]"
}
# Each line matching this is recognized as a subcommand. The name
# of the subcommand is the first subexpression.
# 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' ' ')"
}
sed -ne "s/$gsu_command_regex/\1/g;T;p" $0
} | sort | tr '\n' ' ')"
}
-export -f _gsu_available_commands
_gsu_print_available_commands()
{(
_gsu_print_available_commands()
{(
-export -f _gsu_print_available_commands
export gsu_prefs_txt="
Print the current preferences.
export gsu_prefs_txt="
Print the current preferences.
export gsu_man_txt="
Print the manual.
export gsu_man_txt="
Print the manual.
fi
gsu_short_msg "$txt ###"
}
fi
gsu_short_msg "$txt ###"
}
-export -f _gsu_banner_msg
export gsu_help_txt="
Print online help.
export gsu_help_txt="
Print online help.
result="$1"
ret=-$E_GSU_BAD_COMMAND
}
result="$1"
ret=-$E_GSU_BAD_COMMAND
}
# Wrapper for bash's getopts.
#
# Wrapper for bash's getopts.
#
_gsu_print_available_commands
exit 1
}
_gsu_print_available_commands
exit 1
}
# Check number of arguments.
#
# Check number of arguments.
#
[[ $1 -gt $3 ]] && return
ret=$GSU_SUCCESS
}
[[ $1 -gt $3 ]] && return
ret=$GSU_SUCCESS
}
-export -f gsu_check_arg_count
-