From: Andre Noll Date: Wed, 28 Sep 2011 14:47:46 +0000 (+0200) Subject: gsu: Don't export functions. X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=c75c58e9aec5a02ffe5245df373d3eeb432769b2;p=gsu.git gsu: Don't export functions. This is no longer necessary now that all gsu scripts include the gsu shell library directly. --- diff --git a/misc/gsu/common b/misc/gsu/common index 63b2ab6..9b8127d 100644 --- a/misc/gsu/common +++ b/misc/gsu/common @@ -30,7 +30,6 @@ $gsu_errors $gsu_errors EOF } -export -f _gsu_init_errors # check if $1 is a number gsu_is_a_number() @@ -42,25 +41,21 @@ 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() { @@ -83,7 +78,6 @@ gsu_err_msg() fi gsu_msg "$txt" } -export -f gsu_err_msg _gsu_setup() { @@ -92,4 +86,3 @@ _gsu_setup() gsu_config_var_prefix="${gsu_config_var_prefix:=$gsu_name}" _gsu_init_errors } -export -f _gsu_setup diff --git a/misc/gsu/config b/misc/gsu/config index df96af2..e8d4471 100644 --- a/misc/gsu/config +++ b/misc/gsu/config @@ -69,7 +69,6 @@ gsu_check_options() done ret=$GSU_SUCCESS } -export -f gsu_check_options # Call gsu_check_options(), die on errors. gsu_check_options_or_die() diff --git a/misc/gsu/subcommand b/misc/gsu/subcommand index 332e5a0..f09c66d 100644 --- a/misc/gsu/subcommand +++ b/misc/gsu/subcommand @@ -10,7 +10,6 @@ _gsu_usage() { 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. @@ -23,7 +22,6 @@ _gsu_available_commands() sed -ne "s/$gsu_command_regex/\1/g;T;p" $0 } | sort | tr '\n' ' ')" } -export -f _gsu_available_commands _gsu_print_available_commands() {( @@ -44,7 +42,6 @@ _gsu_print_available_commands() echo ) 2>&1 } -export -f _gsu_print_available_commands export gsu_prefs_txt=" Print the current preferences. @@ -95,7 +92,6 @@ _com_prefs() echo done } -export -f _com_prefs export gsu_man_txt=" Print the manual. @@ -139,7 +135,6 @@ _com_man() done ret=$GSU_SUCCESS } -export -f _com_man _gsu_banner_msg() { @@ -151,7 +146,6 @@ _gsu_banner_msg() fi gsu_short_msg "$txt ###" } -export -f _gsu_banner_msg export gsu_help_txt=" Print online help. @@ -215,7 +209,6 @@ _com_help() result="$1" ret=-$E_GSU_BAD_COMMAND } -export -f _com_help # Wrapper for bash's getopts. # @@ -302,7 +295,6 @@ gsu_getopts() " ret=$GSU_SUCCESS } -export -f gsu_getopts gsu() { @@ -345,7 +337,6 @@ gsu() _gsu_print_available_commands exit 1 } -export -f gsu # Check number of arguments. # @@ -376,5 +367,3 @@ gsu_check_arg_count() [[ $1 -gt $3 ]] && return ret=$GSU_SUCCESS } -export -f gsu_check_arg_count -