#!/bin/bash

set +x

BASHRC_PATH="$(realpath "$1/bashrc")"

if [ -f ~/.bashrc ] || [ -L ~/.bashrc ]
then
    echo "backing up previous bashrc"
    mv ~/.bashrc ~/bashrc.prev
fi

echo "linking bashrc"
ln -s "$BASHRC_PATH" ~/.bashrc

echo "creating bashrc.d"
mkdir -p ~/.bashrc.d

#!/bin/bash

echo
echo "Installing bash completion"
sudo pacman -S bash-completion

echo
BASHRC_PATH="$(realpath "$1/bashrc")"

if [ -f ~/.bashrc ] || [ -L ~/.bashrc ]
then
    echo "backing up previous bashrc"
    mv ~/.bashrc ~/bashrc.prev
fi

echo "linking bashrc"
ln -s "$BASHRC_PATH" ~/.bashrc

echo "creating bashrc.d"
mkdir -p ~/.bashrc.d

Add bash completion to bash config
Add bash completion to bash config
