summaryrefslogtreecommitdiffstats
path: root/bin/bashrc-functions.sh
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gmail.com>2012-09-13 21:40:41 -0700
committerZac Medico <zmedico@gentoo.org>2012-09-13 23:55:44 -0700
commit25a5296f29bc7153fa29e2dfe8de9d08d40d9944 (patch)
tree82588b99b93ed490d9fa5146afad4d04790a25b3 /bin/bashrc-functions.sh
parent2bafee5c926a644e58099bb5dbb3eec7cd80518c (diff)
downloadportage-25a5296f29bc7153fa29e2dfe8de9d08d40d9944.tar.gz
portage-25a5296f29bc7153fa29e2dfe8de9d08d40d9944.tar.bz2
portage-25a5296f29bc7153fa29e2dfe8de9d08d40d9944.zip
drop dead functions
Specifically, esyslog, {un,}set_unless_changed, and remove_path_entry.
Diffstat (limited to 'bin/bashrc-functions.sh')
-rw-r--r--bin/bashrc-functions.sh55
1 files changed, 0 insertions, 55 deletions
diff --git a/bin/bashrc-functions.sh b/bin/bashrc-functions.sh
index 4da558581..9fdf999fe 100644
--- a/bin/bashrc-functions.sh
+++ b/bin/bashrc-functions.sh
@@ -33,61 +33,6 @@ strip_duplicate_slashes() {
fi
}
-# this is a function for removing any directory matching a passed in pattern from
-# PATH
-remove_path_entry() {
- save_IFS
- IFS=":"
- stripped_path="${PATH}"
- while [ -n "$1" ]; do
- cur_path=""
- for p in ${stripped_path}; do
- if [ "${p/${1}}" == "${p}" ]; then
- cur_path="${cur_path}:${p}"
- fi
- done
- stripped_path="${cur_path#:*}"
- shift
- done
- restore_IFS
- PATH="${stripped_path}"
-}
-
-# Set given variables unless these variable have been already set (e.g. during emerge
-# invocation) to values different than values set in make.conf.
-set_unless_changed() {
- if [[ $# -lt 1 ]]; then
- die "${FUNCNAME}() requires at least 1 argument: VARIABLE=VALUE"
- fi
-
- local argument value variable
- for argument in "$@"; do
- if [[ ${argument} != *=* ]]; then
- die "${FUNCNAME}(): Argument '${argument}' has incorrect syntax"
- fi
- variable="${argument%%=*}"
- value="${argument#*=}"
- if eval "[[ \${${variable}} == \$(env -u ${variable} portageq envvar ${variable}) ]]"; then
- eval "${variable}=\"\${value}\""
- fi
- done
-}
-
-# Unset given variables unless these variable have been set (e.g. during emerge
-# invocation) to values different than values set in make.conf.
-unset_unless_changed() {
- if [[ $# -lt 1 ]]; then
- die "${FUNCNAME}() requires at least 1 argument: VARIABLE"
- fi
-
- local variable
- for variable in "$@"; do
- if eval "[[ \${${variable}} == \$(env -u ${variable} portageq envvar ${variable}) ]]"; then
- unset ${variable}
- fi
- done
-}
-
KV_major() {
[[ -z $1 ]] && return 1