Add symlink test to bash files

This commit is contained in:
flyingscorpio@pinebook-pro 2020-04-11 10:24:58 +02:00
parent d6a125a1d9
commit 9b76a83169

View file

@ -136,7 +136,7 @@ install_scripts() { # {{{
separator separator
} # }}} } # }}}
install_scripts # install_scripts
update_vim() { # {{{ update_vim() { # {{{
# Update vim configuration # Update vim configuration
@ -146,7 +146,7 @@ update_vim() { # {{{
separator separator
} # }}} } # }}}
update_vim # update_vim
setup_sddm() { # {{{ setup_sddm() { # {{{
# Update sddm # Update sddm
@ -182,16 +182,32 @@ setup_bash_files() { # {{{
# Set up .bashrc # Set up .bashrc
echo "Updating .bashrc..." echo "Updating .bashrc..."
if [ ! -L ~/.bashrc ]; then if [ ~/.bashrc -ef "$BASE_DIR"/dotfiles/bash/bashrc ]; then
ln -rs "$BASE_DIR"/dotfiles/bash/bashrc ~/.bashrc 2> /dev/null echo "${GREEN}.bashrc points to the right location."
echo "Nothing changed.${NC}"
else
if [ "$OVERWRITE" = 'true' ]; then
rm ~/.bashrc 2> /dev/null
fi
if ln -rs "$BASE_DIR"/dotfiles/bash/bashrc ~/.bashrc; then
echo "${ORANGE}.bashrc symlink created${NC}"
fi
fi fi
separator separator
# Set up .bash_aliases # Set up .bash_aliases
echo "Updating .bash_aliases..." echo "Updating .bash_aliases..."
if [ ! -L ~/.bash_aliases ]; then if [ ~/.bash_aliases -ef "$BASE_DIR"/dotfiles/bash/bash_aliases ]; then
ln -rs "$BASE_DIR"/dotfiles/bash/bash_aliases ~/.bash_aliases 2> /dev/null echo "${GREEN}.bash_aliases points to the right location."
echo "Nothing changed.${NC}"
else
if [ "$OVERWRITE" = 'true' ]; then
rm ~/.bash_aliases 2> /dev/null
fi
if ln -rs "$BASE_DIR"/dotfiles/bash/bash_aliases ~/.bash_aliases; then
echo "${ORANGE}.bash_aliases symlink created${NC}"
fi
fi fi
separator separator
@ -233,7 +249,7 @@ install_rust() { # {{{
separator separator
} # }}} } # }}}
install_rust # install_rust
bash_git_prompt() { # {{{ bash_git_prompt() { # {{{
# Clone bash-git-prompt # Clone bash-git-prompt
@ -251,7 +267,7 @@ bash_git_prompt() { # {{{
separator separator
} # }}} } # }}}
bash_git_prompt # bash_git_prompt
markdown_mimetype() { # {{{ markdown_mimetype() { # {{{
# Add MIME type for reading .md files in Firefox (need to add extension too) # Add MIME type for reading .md files in Firefox (need to add extension too)
@ -271,7 +287,7 @@ markdown_mimetype() { # {{{
separator separator
} # }}} } # }}}
markdown_mimetype # markdown_mimetype
clone_projects() { # {{{ clone_projects() { # {{{
# Clone projects # Clone projects
@ -281,4 +297,4 @@ clone_projects() { # {{{
separator separator
} # }}} } # }}}
clone_projects # clone_projects