gsu: Don't export functions.
authorAndre Noll <maan@systemlinux.org>
Wed, 28 Sep 2011 14:47:46 +0000 (16:47 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 29 Aug 2014 19:39:58 +0000 (21:39 +0200)
This is no longer necessary now that all gsu scripts include the gsu
shell library directly.

misc/gsu/common
misc/gsu/config
misc/gsu/subcommand

index 63b2ab6f0b3cfcac825e5ba3de179761a934b81a..9b8127d2ee2c2dc37d81381753d781baf399582b 100644 (file)
@@ -30,7 +30,6 @@ $gsu_errors
        $gsu_errors
 EOF
 }
        $gsu_errors
 EOF
 }
-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()
@@ -42,25 +41,21 @@ 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
 }
-export -f gsu_short_msg
 
 gsu_msg()
 {
        gsu_short_msg "$_gsu_self: $1"
 }
 
 gsu_msg()
 {
        gsu_short_msg "$_gsu_self: $1"
 }
-export -f gsu_msg
 
 gsu_date_msg()
 {
        gsu_short_msg "$_gsu_self $(date): $1"
 }
 
 gsu_date_msg()
 {
        gsu_short_msg "$_gsu_self $(date): $1"
 }
-export -f gsu_date_msg
 
 gsu_err_msg()
 {
 
 gsu_err_msg()
 {
@@ -83,7 +78,6 @@ gsu_err_msg()
        fi
        gsu_msg "$txt"
 }
        fi
        gsu_msg "$txt"
 }
-export -f gsu_err_msg
 
 _gsu_setup()
 {
 
 _gsu_setup()
 {
@@ -92,4 +86,3 @@ _gsu_setup()
        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_setup
index df96af2d5e7019c70865e9f371f6511282b4d193..e8d4471cc822e2ca90850482f9084084db70ce17 100644 (file)
@@ -69,7 +69,6 @@ gsu_check_options()
        done
        ret=$GSU_SUCCESS
 }
        done
        ret=$GSU_SUCCESS
 }
-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()
index 332e5a0d43273f352e133f4a31507b061b4bb018..f09c66de613707c42794947e8b0b787c79f11f5e 100644 (file)
@@ -10,7 +10,6 @@ _gsu_usage()
 {
        gsu_short_msg "# Usage: $_gsu_self command [options]"
 }
 {
        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.
 
 # 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' ' ')"
 }
                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()
 {(
@@ -44,7 +42,6 @@ _gsu_print_available_commands()
        echo
 ) 2>&1
 }
        echo
 ) 2>&1
 }
-export -f _gsu_print_available_commands
 
 export gsu_prefs_txt="
 Print the current preferences.
 
 export gsu_prefs_txt="
 Print the current preferences.
@@ -95,7 +92,6 @@ _com_prefs()
                echo
        done
 }
                echo
        done
 }
-export -f _com_prefs
 
 export gsu_man_txt="
 Print the manual.
 
 export gsu_man_txt="
 Print the manual.
@@ -139,7 +135,6 @@ _com_man()
         done
         ret=$GSU_SUCCESS
 }
         done
         ret=$GSU_SUCCESS
 }
-export -f _com_man
 
 _gsu_banner_msg()
 {
 
 _gsu_banner_msg()
 {
@@ -151,7 +146,6 @@ _gsu_banner_msg()
        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.
@@ -215,7 +209,6 @@ _com_help()
        result="$1"
        ret=-$E_GSU_BAD_COMMAND
 }
        result="$1"
        ret=-$E_GSU_BAD_COMMAND
 }
-export -f _com_help
 
 # Wrapper for bash's getopts.
 #
 
 # Wrapper for bash's getopts.
 #
@@ -302,7 +295,6 @@ gsu_getopts()
 "
        ret=$GSU_SUCCESS
 }
 "
        ret=$GSU_SUCCESS
 }
-export -f gsu_getopts
 
 gsu()
 {
 
 gsu()
 {
@@ -345,7 +337,6 @@ gsu()
        _gsu_print_available_commands
        exit 1
 }
        _gsu_print_available_commands
        exit 1
 }
-export -f gsu
 
 # Check number of arguments.
 #
 
 # Check number of arguments.
 #
@@ -376,5 +367,3 @@ gsu_check_arg_count()
        [[ $1 -gt $3 ]] && return
        ret=$GSU_SUCCESS
 }
        [[ $1 -gt $3 ]] && return
        ret=$GSU_SUCCESS
 }
-export -f gsu_check_arg_count
-