added ssh_config, removed duplicate code for setting zsh as shell

This commit is contained in:
Adrien Luxey-Bitri 2022-10-02 23:15:17 +02:00
parent 5a10b95d43
commit b59de5f837
2 changed files with 15 additions and 8 deletions

View file

@ -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

5
ssh_config Normal file
View file

@ -0,0 +1,5 @@
Host rasp
HostName 192.168.1.50
Host spoutnik
HostName 192.168.1.60