1# Check for interactive bash and that we haven't already been sourced.
2[ -z "$BASH_VERSION" -o -z "$PS1" -o -n "$BASH_COMPLETION" ] && return
3
4# Check for recent enough version of bash.
5bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
6if [ $bmajor -gt 3 ] || [ $bmajor -eq 3 -a $bminor -ge 2 ]; then
7    if shopt -q progcomp && [ -r /boot/common/etc/bash_completion ]; then
8        # Source completion code.
9        . /boot/common/etc/bash_completion
10    fi
11fi
12unset bash bmajor bminor
13