From b65ffc51f3e729cbaef76b81dd4ec90ff28b0109 Mon Sep 17 00:00:00 2001 From: sonny Date: Wed, 1 Aug 2018 21:16:36 +0200 Subject: [PATCH] Remove readline --- initialize_script | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/initialize_script b/initialize_script index c4c259f..96f4f72 100755 --- a/initialize_script +++ b/initialize_script @@ -1,29 +1,12 @@ #!/bin/bash # Setup script for vim & tmux -function get_path { - # Get the full path of a file - SCRIPT=`realpath $0` - # Remove everything but the filename - SCRIPTPATH=`dirname $SCRIPT` -} +# Get the full path of the script +SCRIPT_PATH=`realpath $0` -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 -sf $SCRIPTPATH/{.bashrc,vim/.vimrc,.tmux.conf,.profile} $HOME/; - ln -sf $SCRIPTPATH/vim/colors $HOME/.vim/ - echo 'Linking configuration files done' -elif [[ "$USER" == "root" ]]; then - get_path - mkdir /root/.vim - ln -sf $SCRIPTPATH/{.bashrc,vim/.vimrc,.tmux.conf,.profile} /root/ - ln -sf $SCRIPTPATH/vim/colors /root/.vim/ - echo 'Linking configuration files done' -else - echo 'No selection was made' - exit 1 -fi +# Remove the filename +DOTFILES=`dirname $SCRIPT` +mkdir $HOME/.vim +ln -sf $DOTFILES/{.bashrc,vim/.vimrc,.tmux.conf,.profile} $HOME/ +ln -sf $DOTFILES/vim/colors $HOME/.vim/