Replace `$BASH` with `$BASH_IT` because `$BASH` is already used on *nix systems for the pathname to the executable (http://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html#Bash-Variables)

pull/81/merge^2
John Schulz 2011-09-20 11:07:48 -04:00
parent 11214382c5
commit 323ce20a2d
4 changed files with 22 additions and 22 deletions

View File

@ -7,11 +7,11 @@ alias reload='source ~/.bash_profile'
# Load the framework # Load the framework
# Load colors first so they can be use in base theme # Load colors first so they can be use in base theme
source "${BASH}/themes/colors.theme.bash" source "${BASH_IT}/themes/colors.theme.bash"
source "${BASH}/themes/base.theme.bash" source "${BASH_IT}/themes/base.theme.bash"
# Library # Library
LIB="${BASH}/lib/*.bash" LIB="${BASH_IT}/lib/*.bash"
for config_file in $LIB for config_file in $LIB
do do
source $config_file source $config_file
@ -20,11 +20,11 @@ done
# Load enabled aliases, completion, plugins # Load enabled aliases, completion, plugins
for file_type in "aliases" "completion" "plugins" for file_type in "aliases" "completion" "plugins"
do do
if [ ! -d "${BASH}/${file_type}/enabled" ] if [ ! -d "${BASH_IT}/${file_type}/enabled" ]
then then
continue continue
fi fi
FILES="${BASH}/${file_type}/enabled/*.bash" FILES="${BASH_IT}/${file_type}/enabled/*.bash"
for config_file in $FILES for config_file in $FILES
do do
source $config_file source $config_file
@ -32,13 +32,13 @@ do
done done
# Load any custom aliases that the user has added # Load any custom aliases that the user has added
if [ -e "${BASH}/aliases/custom.aliases.bash" ] if [ -e "${BASH_IT}/aliases/custom.aliases.bash" ]
then then
source "${BASH}/aliases/custom.aliases.bash" source "${BASH_IT}/aliases/custom.aliases.bash"
fi fi
# Custom # Custom
CUSTOM="${BASH}/custom/*.bash" CUSTOM="${BASH_IT}/custom/*.bash"
for config_file in $CUSTOM for config_file in $CUSTOM
do do
source $config_file source $config_file

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
BASH="$HOME/.bash_it" BASH_IT="$HOME/.bash_it"
cp $HOME/.bash_profile $HOME/.bash_profile.bak cp $HOME/.bash_profile $HOME/.bash_profile.bak
@ -30,24 +30,24 @@ done
function load_all() { function load_all() {
file_type=$1 file_type=$1
[ ! -d "$BASH/$file_type/enabled" ] && mkdir "$BASH/${file_type}/enabled" [ ! -d "$BASH_IT/$file_type/enabled" ] && mkdir "$BASH_IT/${file_type}/enabled"
ln -s $BASH/${file_type}/available/* "${BASH}/${file_type}/enabled" ln -s $BASH_IT/${file_type}/available/* "${BASH_IT}/${file_type}/enabled"
} }
function load_some() { function load_some() {
file_type=$1 file_type=$1
for file in `ls $BASH/${file_type}/available` for file in `ls $BASH_IT/${file_type}/available`
do do
if [ ! -d "$BASH/$file_type/enabled" ] if [ ! -d "$BASH_IT/$file_type/enabled" ]
then then
mkdir "$BASH/$file_type/enabled" mkdir "$BASH_IT/$file_type/enabled"
fi fi
while true while true
do do
read -p "Would you like to enable the ${file%.*.*} $file_type? [Y/N] " RESP read -p "Would you like to enable the ${file%.*.*} $file_type? [Y/N] " RESP
case $RESP in case $RESP in
[yY]) [yY])
ln -s "$BASH/$file_type/available/$file" "$BASH/$file_type/enabled" ln -s "$BASH_IT/$file_type/available/$file" "$BASH_IT/$file_type/enabled"
break break
;; ;;
[nN]) [nN])

View File

@ -8,6 +8,6 @@ export GREP_COLOR='1;33'
export LSCOLORS='Gxfxcxdxdxegedabagacad' export LSCOLORS='Gxfxcxdxdxegedabagacad'
# Load the theme # Load the theme
if [[ $BASH_THEME ]]; then if [[ $BASH_IT_THEME ]]; then
source "$BASH/themes/$BASH_THEME/$BASH_THEME.theme.bash" source "$BASH_IT/themes/$BASH_IT_THEME/$BASH_IT_THEME.theme.bash"
fi fi

View File

@ -7,11 +7,11 @@
export PATH=$PATH:~/.gem/ruby/1.8/bin:/opt/nginx/sbin export PATH=$PATH:~/.gem/ruby/1.8/bin:/opt/nginx/sbin
# Path to the bash it configuration # Path to the bash it configuration
export BASH=$HOME/.bash_it export BASH_IT=$HOME/.bash_it
# Lock and Load a custom theme file # Lock and Load a custom theme file
# location /.bash_it/themes/ # location /.bash_it/themes/
export BASH_THEME='bobby' export BASH_IT_THEME='bobby'
# Your place for hosting Git repos. I use this for private repos. # Your place for hosting Git repos. I use this for private repos.
export GIT_HOSTING='git@git.domain.com' export GIT_HOSTING='git@git.domain.com'
@ -40,4 +40,4 @@ export TODO="t"
#export VCPROMPT_EXECUTABLE=~/.vcprompt/bin/vcprompt #export VCPROMPT_EXECUTABLE=~/.vcprompt/bin/vcprompt
# Load Bash It # Load Bash It
source $BASH/bash_it.sh source $BASH_IT/bash_it.sh