functionized!
This commit is contained in:
parent
a543d00d47
commit
6fe1dba8b1
1 changed files with 30 additions and 21 deletions
31
init.sh
31
init.sh
|
@ -61,30 +61,39 @@ chmod 0700 ~/.ssh
|
||||||
chmod -R 0600 ~/.ssh/*
|
chmod -R 0600 ~/.ssh/*
|
||||||
|
|
||||||
#Configure git user
|
#Configure git user
|
||||||
echo -n "Would you like to configure your git name and email? (y/n) => "; read -r answer
|
git_user () {
|
||||||
if [[ $answer = "Y" ]] || [[ $answer = "y" ]]; then
|
echo -n "Would you like to configure your git name and email? (y/n) => "; read -r answer
|
||||||
|
if [[ $answer = "Y" ]] || [[ $answer = "y" ]]; then
|
||||||
echo -n "What is your git user name => "; read -r name
|
echo -n "What is your git user name => "; read -r name
|
||||||
git config --global user.name "$name"
|
git config --global user.name "$name"
|
||||||
echo -n "What is your git email => "; read -r email
|
echo -n "What is your git email => "; read -r email
|
||||||
git config --global user.email "$email"
|
git config --global user.email "$email"
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
#install spacevim
|
#install spacevim
|
||||||
if [ ! -e ~/.space-vim ]; then
|
spacevim () {
|
||||||
|
if [ ! -e ~/.space-vim ]; then
|
||||||
echo "Install SpaceVim now? y/n"; read -r answer
|
echo "Install SpaceVim now? y/n"; read -r answer
|
||||||
if [[ $answer = "Y" ]] || [[ $answer = "y" ]]; then
|
if [[ $answer = "Y" ]] || [[ $answer = "y" ]]; then
|
||||||
mv "$HOME/.vim" "$HOME/vim_bk"
|
mv "$HOME/.vim" "$HOME/vim_bk"
|
||||||
mv "$HOME/.vimrc" "$HOME/vimrc_bk"
|
mv "$HOME/.vimrc" "$HOME/vimrc_bk"
|
||||||
(curl -sLf https://spacevim.org/install.sh | bash)
|
(curl -sLf https://spacevim.org/install.sh | bash)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
#install fonts for terminal
|
#install fonts for terminal
|
||||||
echo "installing fonts"
|
fonts () {
|
||||||
mkdir ~/.fonts
|
echo "installing fonts"
|
||||||
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/SourceCodePro.zip
|
mkdir ~/.fonts
|
||||||
unzip SourceCodePro.zip -x '*Compatible.ttf' -d "$HOME/.fonts"
|
wget -q https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/SourceCodePro.zip
|
||||||
rm SourceCodePro.zip
|
unzip -q SourceCodePro.zip -x '*Compatible.ttf' -d "$HOME/.fonts"
|
||||||
|
rm SourceCodePro.zip
|
||||||
|
}
|
||||||
|
|
||||||
|
git_user
|
||||||
|
spacevim
|
||||||
|
fonts
|
||||||
|
|
||||||
echo "*******************************"
|
echo "*******************************"
|
||||||
echo "* Restart your terminal *"
|
echo "* Restart your terminal *"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue