#!/bin/bash ## Script Location SCRIPTDIR=$(dirname $0) source "$SCRIPTDIR/common/colors.sh" source "$SCRIPTDIR/common/functions.sh" source "$SCRIPTDIR/common/load-defaults.sh" BASHRCFILE="$HOME/.bashrc" custom_bash_aliases_path="/etc/bash_aliases" custom_bash_aliases_git="https://git.deathbybandaid.net/deathbybandaid/bash_aliases.git" git_update "topgrade" "$custom_bash_aliases_path" "$custom_bash_aliases_git" printf "$COL_LIGHT_BLUE" "* Checking if bash aliases are setup in ~/.bashrc" if [[ $(grep -L "$custom_bash_aliases_path" $BASHRCFILE) ]]; then printf "$COL_YELLOW" "** Linking bash aliases" cat <> $BASHRCFILE # Aliases if [ -f $custom_bash_aliases_path/main.aliases ]; then . $custom_bash_aliases_path/main.aliases fi EOT else printf "$COL_YELLOW" "** bash aliases already linked" fi printf "$COL_LIGHT_BLUE" "* Importing Bash Aliases" source $BASHRCFILE