added color options to install.sh
This commit is contained in:
parent
7c3e1c7fae
commit
4d6f32002d
2 changed files with 22 additions and 1 deletions
2
.envars
2
.envars
|
@ -7,7 +7,7 @@ export PATH=$PATH:$HOME/bin
|
||||||
# green@white[abspath]
|
# green@white[abspath]
|
||||||
export PS1="\[\e[32m\]\u\[\e[m\]@\H\[\e[36m\][\[\e[m\]\[\e[33m\]\w\[\e[m\]\[\e[36m\]]\[\e[m\]: "
|
export PS1="\[\e[32m\]\u\[\e[m\]@\H\[\e[36m\][\[\e[m\]\[\e[33m\]\w\[\e[m\]\[\e[36m\]]\[\e[m\]: "
|
||||||
# red@white[abspath]
|
# red@white[abspath]
|
||||||
#export PS1="\[\e[31m\]\u\[\e[m\]@\H\[\e[36m\][\[\e[m\]\[\e[33m\]\w\[\e[m\]\[\e[36m\]]\[\e[m\]: "
|
export PS1="\[\e[31m\]\u\[\e[m\]@\H\[\e[36m\][\[\e[m\]\[\e[33m\]\w\[\e[m\]\[\e[36m\]]\[\e[m\]: "
|
||||||
|
|
||||||
export EDITOR=vim
|
export EDITOR=vim
|
||||||
export HISTTIMEFORMAT="%d/%m/%y %T "
|
export HISTTIMEFORMAT="%d/%m/%y %T "
|
||||||
|
|
21
install.sh
21
install.sh
|
@ -2,19 +2,40 @@
|
||||||
# inspiration from https://github.com/webpro/dotfiles/blob/master/install.sh
|
# inspiration from https://github.com/webpro/dotfiles/blob/master/install.sh
|
||||||
# inspiration from https://medium.com/@webprolific/getting-started-with-dotfiles-43c3602fd789#.jfhvg130r
|
# inspiration from https://medium.com/@webprolific/getting-started-with-dotfiles-43c3602fd789#.jfhvg130r
|
||||||
|
|
||||||
|
# PS1 COLOR
|
||||||
|
GREEN="\[\e[32m\]\u\[\e[m\]@\H\[\e[36m\][\[\e[m\]\[\e[33m\]\w\[\e[m\]\[\e[36m\]]\[\e[m\]:"
|
||||||
|
RED=""\[\e[31m\]\u\[\e[m\]@\H\[\e[36m\][\[\e[m\]\[\e[33m\]\w\[\e[m\]\[\e[36m\]]\[\e[m\]:"
|
||||||
|
|
||||||
# get current dir so script can run from anywhere
|
# get current dir so script can run from anywhere
|
||||||
export DOTFILES_DIR
|
export DOTFILES_DIR
|
||||||
DOTFILES_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DOTFILES_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
|
||||||
# update dot files by pulling latest repo
|
# update dot files by pulling latest repo
|
||||||
[ -d "$DOTFILES_DIR/.git" ] && git --work-tree="$DOTFILES_DIR" --git-dir="$DOTFILES_DIR/.git" pull origin master
|
[ -d "$DOTFILES_DIR/.git" ] && git --work-tree="$DOTFILES_DIR" --git-dir="$DOTFILES_DIR/.git" pull origin master
|
||||||
|
|
||||||
|
# run checks for color
|
||||||
|
if [[ $1 = "color=green" ]]; then
|
||||||
|
echo "export PS1=$GREEN" >> "$DOTFILES_DIR/.envars"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $1 = "color=red" ]; then
|
||||||
|
echo "export PS1=$RED" >> "$DOTFILES_DIR/.envars"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# symlink our dotfiles to our users home dir so they can make use of all the good stuff in it
|
# symlink our dotfiles to our users home dir so they can make use of all the good stuff in it
|
||||||
ln -sfv "$DOTFILES_DIR/.bash_profile" ~
|
ln -sfv "$DOTFILES_DIR/.bash_profile" ~
|
||||||
ln -sfv "$DOTFILES_DIR/.bashrc" ~
|
ln -sfv "$DOTFILES_DIR/.bashrc" ~
|
||||||
ln -sfv "$DOTFILES_DIR/.bash_aliases" ~
|
ln -sfv "$DOTFILES_DIR/.bash_aliases" ~
|
||||||
ln -sfv "$DOTFILES_DIR/.bash_functions" ~
|
ln -sfv "$DOTFILES_DIR/.bash_functions" ~
|
||||||
|
|
||||||
ln -sfv "$DOTFILES_DIR/.envars" ~
|
ln -sfv "$DOTFILES_DIR/.envars" ~
|
||||||
|
|
||||||
ln -sfv "$DOTFILES_DIR/.vim" ~
|
ln -sfv "$DOTFILES_DIR/.vim" ~
|
||||||
ln -sfv "$DOTFILES_DIR/.vimrc" ~
|
ln -sfv "$DOTFILES_DIR/.vimrc" ~
|
||||||
|
|
||||||
|
# download and install vundle for vim plugins
|
||||||
|
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue