saving uncommitted changes in /etc prior to emerge run

This commit is contained in:
hasufell 2015-08-18 17:55:28 +02:00 committed by Hans Wurst
parent 104c532e3e
commit dccce9f83f

View File

@ -1,52 +0,0 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /var/cvsroot/gentoo-x86/app-shells/bash-completion/files/bash-completion.sh-gentoo-1.2,v 1.1 2010/07/02 15:07:33 darkside Exp $
# Check for interactive bash and that we haven't already been sourced.
[ -z "$BASH_VERSION" -o -z "$PS1" -o -n "$BASH_COMPLETION" ] && return
# Check for recent enough version of bash.
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
if [ $bmajor -gt 3 ] || [ $bmajor -eq 3 -a $bminor -ge 2 ]; then
_load_completions() {
declare f x loaded_pre=false
for f; do
if [[ -f $f ]]; then
# Prevent loading base twice, initially and via glob
if $loaded_pre && [[ $f == */base ]]; then
continue
fi
# Some modules, including base, depend on the definitions
# in .pre. See the ebuild for how this is created.
if ! $loaded_pre; then
if [[ ${BASH_COMPLETION-unset} == unset ]]; then
BASH_COMPLETION="/usr/share/bash-completion/base"
fi
source "/usr/share/bash-completion/.pre"
loaded_pre=true
fi
source "$f"
fi
done
# Clean up
$loaded_pre && source "/usr/share/bash-completion/.post"
unset -f _load_completions # not designed to be called more than once
}
# 1. Load base, if eselected. This was previously known as
# /etc/bash_completion
# 2. Load completion modules, maintained via eselect bashcomp --global
# 3. Load user completion modules, maintained via eselect bashcomp
# 4. Load user completion file last, overrides modules at user discretion
# This order is subject to change once upstream decides on something.
_load_completions \
"/etc/bash_completion.d/base" \
~/.bash_completion.d/base \
"/etc/bash_completion.d/"* \
~/.bash_completion.d/* \
~/.bash_completion
fi
unset bash bmajor bminor