From b59de5f837a0c066b77d3536f2fd516c0aa8ac50 Mon Sep 17 00:00:00 2001 From: Adrien Luxey-Bitri Date: Sun, 2 Oct 2022 23:15:17 +0200 Subject: [PATCH] added ssh_config, removed duplicate code for setting zsh as shell --- install.sh | 18 ++++++++++-------- ssh_config | 5 +++++ 2 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 ssh_config diff --git a/install.sh b/install.sh index 7cf5d88..6c53daa 100755 --- a/install.sh +++ b/install.sh @@ -30,6 +30,7 @@ function syncDotfiles { rm -rf $HOME/.vim > /dev/null 2>&1 rm -rf $HOME/.tmux > /dev/null 2>&1 rm -rf $HOME/.config/sublime-text-3/Packages/User > /dev/null 2>&1 + rm $HOME/.ssh/config > /dev/null 2>&1 echo Installing our dotfiles... ln -s $DOTDIR/zshrc $HOME/.zshrc @@ -42,6 +43,8 @@ function syncDotfiles { elif [ -d "$HOME/.config/sublime-text" ]; then ln -s $DOTDIR/sublime $HOME/.config/sublime-text/Packages/User fi + mkdir -p $HOME/.ssh + ln -s $DOTDIT/ssh_config ~/.ssh/config } function installDependencies { @@ -70,18 +73,17 @@ function installDependencies { git clone https://github.com/bhilburn/powerlevel9k.git $HOME/.oh-my-zsh/custom/themes/powerlevel9k > /dev/null 2>&1 fi fi - # Make ZSH is the current SHELL - echo $SHELL | grep zsh > /dev/null || chsh -s $(which zsh) - echo "Pulling git submodules..." cd $DOTDIR && (git submodule update --init >> /dev/null 2>&1) || echo "'git submobule update --init' failed, is your SSH key available on GitHub?" && exit -1; - # Set ZSH as default shell - if [ ! "$SHELL" = "$(which zsh)" ]; then - echo Setting ZSH as default shell... - chsh -s $(which zsh) - fi + # Make ZSH is the current SHELL + echo $SHELL | grep zsh > /dev/null || chsh -s $(which zsh) + # Prev version + #if [ ! "$SHELL" = "$(which zsh)" ]; then + # echo Setting ZSH as default shell... + # chsh -s $(which zsh) + #fi } # Parse command-line arguments diff --git a/ssh_config b/ssh_config new file mode 100644 index 0000000..9927800 --- /dev/null +++ b/ssh_config @@ -0,0 +1,5 @@ +Host rasp + HostName 192.168.1.50 + +Host spoutnik + HostName 192.168.1.60