New .bashrc

This commit is contained in:
Sonny Bakker 2017-08-23 21:34:57 +02:00
parent 9a03d6de56
commit 0da56d6ae1
3 changed files with 33 additions and 11 deletions

View file

@ -9,19 +9,26 @@ function get_path {
}
function user_config {
read -p 'Install the script for a normal user or root account? [user/root]: ' USER
if [[ "$USER" == "user" ]]; then
get_path
mkdir $HOME/.vim
ln -s $SCRIPTPATH/{vim/.vimrc,tmux/.tmux.conf} $HOME/;
mkdir $HOME/.vim
if [[ -a $HOME/.bashrc ]]; then
mv $HOME/.bashrc $HOME/.bashrc.old
echo "Old .bashrc moved to .bashrc.old"
fi
ln -s $SCRIPTPATH/{.bashrc,vim/.vimrc,tmux/.tmux.conf} $HOME/;
ln -s $SCRIPTPATH/vim/colors $HOME/.vim/
echo 'Linking configuration files done'
elif [[ "$USER" == "root" ]]; then
get_path
mkdir /root/.vim
ln -s $SCRIPTPATH/{vim/.vimrc,tmux/.tmux.conf} /root/
mkdir /root/.vim
if [[ -a $HOME/.bashrc ]]; then
mv /root/.bashrc /root/.bashrc.old
echo "Old .bashrc moved to .bashrc.old"
fi
ln -s $SCRIPTPATH/{.bashrc,vim/.vimrc,tmux/.tmux.conf} /root/
ln -s $SCRIPTPATH/vim/colors /root/.vim/
echo 'Linking configuration files done'
else