diff --git a/install.sh b/install.sh index a640dfa..145c642 100644 --- a/install.sh +++ b/install.sh @@ -6,6 +6,9 @@ if [ "$EUID" -ne 0 ] && [ "$1" != "-s" ]; then exit 1 fi +USER_NAME=${SUDO_USER:-$USER} +USER_HOME=$(eval echo "~$USER_NAME") + # folder for install files will be removed later cd ~ mkdir install @@ -16,10 +19,10 @@ apt install nala -y nala install ninja-build gettext libtool-bin cmake g++ pkg-config unzip curl git tmux build-essential manpages-dev clangd python3-jedi zsh -y # zsh config -wget https://git.boergmann.it/klaas/shellskripte/raw/branch/main/configs/zshrc -O ~/.zshrc +wget https://git.boergmann.it/klaas/shellskripte/raw/branch/main/configs/zshrc -O $USER_HOME/home/klaas/.zshrc # ssh Keys für alle Maschinen -wget https://git.boergmann.it/klaas/shellskripte/raw/branch/main/ssh/public_keys -O ~/.ssh/authorized_keys +wget https://git.boergmann.it/klaas/shellskripte/raw/branch/main/ssh/public_keys -O $USER_HOME/.ssh/authorized_keys # ssh Password Authenitcatoon no wget https://git.boergmann.it/klaas/shellskripte/raw/branch/main/ssh/ssh_password @@ -34,7 +37,7 @@ sudo make install # config file for nvim mkdir ~/.config/nvim -wget https://git.boergmann.it/klaas/shellskripte/raw/branch/main/configs/init.vim -O ~/.config/nvim/init.vim +wget https://git.boergmann.it/klaas/shellskripte/raw/branch/main/configs/init.vim -O $USER_HOME/.config/nvim/init.vim sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' nvim --headless +PlugInstall +qa # Language support for python and C @@ -59,4 +62,4 @@ yarn build rm -Rf ~/install # zsh nutzen -usermod -s /bin/zsh klaas +usermod -s /bin/zsh $USER_NAME