2022-07-04 16:06:23 +03:00
|
|
|
#!/bin/sh
|
2023-02-05 12:53:53 +03:00
|
|
|
set -e
|
2022-07-04 16:06:23 +03:00
|
|
|
CURRENTDIR="$(pwd)"
|
|
|
|
|
2022-08-09 11:27:28 +03:00
|
|
|
echo "Welcome to ivabus .dotfiles installer"
|
2022-07-04 16:06:23 +03:00
|
|
|
echo "Dotfiles will be installed to $HOME/.dotfiles"
|
2022-07-05 08:33:48 +03:00
|
|
|
echo "Press enter to proceed"
|
2022-07-04 16:06:23 +03:00
|
|
|
read A
|
|
|
|
|
|
|
|
# check for zsh
|
|
|
|
|
|
|
|
if ! command -v zsh > /dev/null
|
|
|
|
then
|
|
|
|
echo "zsh is not installed"
|
2022-08-09 11:27:28 +03:00
|
|
|
echo "Aborting."
|
2022-07-04 16:06:23 +03:00
|
|
|
exit 255
|
|
|
|
fi
|
2024-01-02 17:05:24 +03:00
|
|
|
mkdir -p $HOME/.config/zsh/{plugins,themes}
|
|
|
|
ZSH="$HOME/.config/zsh"
|
2023-02-05 12:53:53 +03:00
|
|
|
echo "Installing zsh theme and plugins"
|
2024-01-02 17:05:24 +03:00
|
|
|
curl -fsSL https://raw.githubusercontent.com/ivabus/ivabus-zsh-theme/master/ivabus.zsh-theme -o $HOME/.config/zsh/themes/ivabus.zsh-theme > /dev/null 2>&1
|
|
|
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.config/zsh/plugins/zsh-syntax-highlighting > /dev/null 2>&1
|
2022-07-04 16:06:23 +03:00
|
|
|
|
2022-12-22 21:46:01 +03:00
|
|
|
# installing vimplug
|
2023-06-10 15:24:25 +03:00
|
|
|
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
|
|
|
|
|
|
|
|
# installing jetbrains mono
|
2022-07-09 18:23:31 +03:00
|
|
|
if [[ $(uname) = "Linux" ]]
|
|
|
|
then
|
|
|
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/install_manual.sh)"
|
|
|
|
fi
|
|
|
|
|
2022-07-04 16:06:23 +03:00
|
|
|
# linking dotfiles to their original locations
|
|
|
|
|
2022-12-22 21:46:01 +03:00
|
|
|
echo "Linking dotfiles."
|
2022-07-04 16:06:23 +03:00
|
|
|
sh $HOME/.dotfiles/tools/relink.sh
|
|
|
|
|
|
|
|
cd $CURRENTDIR
|
|
|
|
|
2022-07-05 08:16:45 +03:00
|
|
|
if [[ $(uname) = "Darwin" ]]
|
2022-07-04 17:48:20 +03:00
|
|
|
then
|
2022-07-05 08:28:55 +03:00
|
|
|
sh $HOME/.dotfiles/tools/mac.sh
|
2022-07-04 17:48:20 +03:00
|
|
|
fi
|
|
|
|
|
2022-08-09 11:27:28 +03:00
|
|
|
echo "Dotfiles installed and linked."
|
2022-07-04 17:07:17 +03:00
|
|
|
read -p "Would you like to configure git? (y/N): " answer
|
|
|
|
if [[ $answer = [Yy] ]]; then
|
2022-07-05 08:28:55 +03:00
|
|
|
sh $HOME/.dotfiles/tools/git.sh
|
2022-07-04 17:48:20 +03:00
|
|
|
fi
|
|
|
|
|
2022-07-05 08:26:29 +03:00
|
|
|
chmod +x $HOME/.dotfiles/tools/*
|
|
|
|
|
2022-08-03 13:22:50 +03:00
|
|
|
exec zsh
|