moved helpers separately
This commit is contained in:
+3
-25
@@ -34,23 +34,9 @@
|
||||
# * OF SUCH DAMAGE.
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Print the path of the configuration file the conf_* functions work on:
|
||||
# the user file ($HOME/.profile.conf) when it exists, otherwise the installation
|
||||
# file ($PROFILE_CONF, defaulting to $MYPATH/profile.conf). The returned path
|
||||
# may not exist yet.
|
||||
# Usage: _conf_path
|
||||
_conf_path()
|
||||
{
|
||||
if [[ -f "$HOME/.profile.conf" ]]; then
|
||||
printf '%s\n' "$HOME/.profile.conf"
|
||||
else
|
||||
printf '%s\n' "${PROFILE_CONF:-${MYPATH}/profile.conf}"
|
||||
fi
|
||||
}
|
||||
export -f _conf_path
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# Common helpers, then the ones private to this module (helpers/conf.sh)
|
||||
declare -F _profile_load_helpers >/dev/null || . "$(dirname -- "${BASH_SOURCE[0]}")/../helpers/common.sh"
|
||||
_profile_load_helpers "${BASH_SOURCE[0]}"
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Save or update a key=value pair in a section of the profile configuration file.
|
||||
@@ -213,9 +199,6 @@ conf_save()
|
||||
}
|
||||
}
|
||||
export -f conf_save
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Display the profile configuration file, with optional section and key filters.
|
||||
# The same file resolution as conf_save is used: $HOME/.profile.conf when
|
||||
@@ -401,9 +384,6 @@ conf_dump()
|
||||
' "$conf_file" "$conf_file"
|
||||
}
|
||||
export -f conf_dump
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Set TERM to the best terminal capability available on this system.
|
||||
# Called automatically at sourcing time.
|
||||
@@ -526,8 +506,6 @@ term_set()
|
||||
export -f term_set
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
term_set
|
||||
|
||||
|
||||
# EOF
|
||||
|
||||
Reference in New Issue
Block a user