From 7edccd44e9c3938d01c66fae19bcf1544ab2980b Mon Sep 17 00:00:00 2001 From: Kris Lamoureux Date: Sun, 12 Jan 2020 01:22:22 -0500 Subject: [PATCH] Run the .bashrc and slight formatting adjustment Slight formatting change and replaced sourcing all dotfiles with running just the .bashrc --- .bash_aliases | 2 +- install.sh | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.bash_aliases b/.bash_aliases index 68546ca..5e49f5c 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -61,6 +61,6 @@ alias 'day'='redshift -x' # SOCKS proxy over SSH alias 'socks'='screen -dm ssh -D 1337 -q -C -N' -if [ -f ~/.other_aliases ] ; then +if [ -f ~/.other_aliases ]; then source ~/.other_aliases fi diff --git a/install.sh b/install.sh index c274295..bd2785e 100755 --- a/install.sh +++ b/install.sh @@ -12,12 +12,12 @@ for FILE in $DOTFILES ; do NEWLINK=0 # Exclude the repo's .git folder - if [ "$BASEFILE" != ".git" ] ; then + if [ "$BASEFILE" != ".git" ]; then # If basefile is a link - if [ -L ~/$BASEFILE ] ; then + if [ -L ~/$BASEFILE ]; then # If basefile is not a file, and therefore is a broken symlink - if [ ! -f ~/$BASEFILE ] ; then + if [ ! -f ~/$BASEFILE ]; then read -p "Press [ENTER] to replace broken symlink ~/$BASEFILE. CTRL+C aborts" rm ~/$BASEFILE NEWLINK=1 @@ -25,7 +25,7 @@ for FILE in $DOTFILES ; do echo "~/$BASEFILE is already linked." fi # If basefile is a regular file - elif [ -f ~/$BASEFILE ] ; then + elif [ -f ~/$BASEFILE ]; then DATE=$(date '+%Y%m%d%H%M%S') read -p "Press [ENTER] to move ~/$BASEFILE to ~/$BASEFILE-$DATE. CTRL+C aborts" mv ~/$BASEFILE ~/$BASEFILE-$DATE @@ -39,8 +39,9 @@ for FILE in $DOTFILES ; do if [ $NEWLINK -eq 1 ] ; then echo "Creating new link to $(pwd)/$BASEFILE from" ~ ln -s $(pwd)/$BASEFILE ~/$BASEFILE - source ~/$BASEFILE fi fi done + +. ~/.bashrc