mirror of
https://github.com/ivabus/dotfiles
synced 2024-11-25 17:45:06 +03:00
Fix env.sh
This commit is contained in:
parent
2fe1ac4fb0
commit
9364f686ff
2 changed files with 26 additions and 34 deletions
58
tools/env.sh
58
tools/env.sh
|
@ -1,27 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
install_compilers() {
|
|
||||||
echo "=> Installing rust"
|
|
||||||
$TEA +rust-lang.org zsh -c "exit"
|
|
||||||
echo "=> Installing llvm"
|
|
||||||
$TEA +llvm.org zsh -c "exit"
|
|
||||||
echo "=> Installing python"
|
|
||||||
$TEA +python.org zsh -c "exit"
|
|
||||||
}
|
|
||||||
|
|
||||||
install_tools() {
|
|
||||||
echo "=> Installing git"
|
|
||||||
$TEA +git-scm.org zsh -c "exit"
|
|
||||||
echo "=> Installing GitHub CLI"
|
|
||||||
$TEA +cli.github.com zsh -c "exit"
|
|
||||||
echo "=> Installing make & automake & cmake & meson & ninja"
|
|
||||||
$TEA +gnu.org/make zsh -c "exit"
|
|
||||||
$TEA +gnu.org/automake zsh -c "exit"
|
|
||||||
$TEA +cmake.org zsh -c "exit"
|
|
||||||
$TEA +mesonbuild.com zsh -c "exit"
|
|
||||||
$TEA +ninja-build.org zsh -c "exit"
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "=> This script will create small environment"
|
echo "=> This script will create small environment"
|
||||||
echo " with dotfiles from ivabus/ivabus-dotfiles"
|
echo " with dotfiles from ivabus/ivabus-dotfiles"
|
||||||
echo ":: Press enter for continue"
|
echo ":: Press enter for continue"
|
||||||
|
@ -31,7 +9,7 @@ echo "=> Installing env to ~/.env"
|
||||||
mkdir -p ~/.env/bin > /dev/null 2>&1
|
mkdir -p ~/.env/bin > /dev/null 2>&1
|
||||||
|
|
||||||
TEA_PREFIX=~/.env/tea
|
TEA_PREFIX=~/.env/tea
|
||||||
TEA=~/.env/tea/tea.xyz/v0/bin/tea
|
TEA=~/.env/tea/tea.xyz/v0.18.0/bin/tea
|
||||||
PATH=$PATH
|
PATH=$PATH
|
||||||
|
|
||||||
echo "=> Installing static zsh"
|
echo "=> Installing static zsh"
|
||||||
|
@ -39,23 +17,37 @@ sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh-bin/master/ins
|
||||||
PATH="$HOME/.env/bin:$PATH"
|
PATH="$HOME/.env/bin:$PATH"
|
||||||
|
|
||||||
echo "=> Installing tea"
|
echo "=> Installing tea"
|
||||||
sh <(curl https://tea.xyz) -s
|
zsh -c "TEA_PREFIX=~/.env/tea YES=1 sh <(curl https://tea.xyz)"
|
||||||
echo "=> Installing neovim"
|
echo "=> Installing neovim"
|
||||||
$TEA +neovim.io zsh -c "exit"
|
$TEA +neovim.io zsh -c "exit"
|
||||||
echo "=> Installing htop"
|
echo "=> Installing htop"
|
||||||
$TEA +htop.dev zsh -c "exit"
|
$TEA +htop.dev zsh -c "exit"
|
||||||
|
|
||||||
|
|
||||||
echo -n ":: Would you like to install compilers/interpretators (LLVM, Rust, Python)? (Y/n): "
|
echo -n ":: Would you like to install compilers/interpretators (LLVM, Rust, Python)? (y/N): "
|
||||||
read $INSTALL_COMPILERS
|
read INSTALL_COMPILERS
|
||||||
if [ "${INSTALL_COMPILERS^^}" = "Y" ]; then
|
if [[ $INSTALL_COMPILERS == "y" || $INSTALL_COMPILERS == "Y" ]]; then
|
||||||
install_compilers
|
echo "=> Installing rust"
|
||||||
|
$TEA +rust-lang.org zsh -c "exit"
|
||||||
|
echo "=> Installing llvm"
|
||||||
|
$TEA +llvm.org zsh -c "exit"
|
||||||
|
echo "=> Installing python"
|
||||||
|
$TEA +python.org zsh -c "exit"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n ":: Would you like to install development tools (git, github cli, make/cmake/meson/ninja)? (Y/n): "
|
echo -n ":: Would you like to install development tools (git, github cli, make/cmake/meson/ninja)? (y/N): "
|
||||||
read $INSTALL_TOOLS
|
read INSTALL_TOOLS
|
||||||
if [ "${INSTALL_TOOLS^^}" = "Y" ]; then
|
if [[ $INSTALL_TOOLS == "y" || $INSTALL_TOOLS == "Y" ]]; then
|
||||||
install_tools
|
echo "=> Installing git"
|
||||||
|
$TEA +git-scm.org zsh -c "exit"
|
||||||
|
echo "=> Installing GitHub CLI"
|
||||||
|
$TEA +cli.github.com zsh -c "exit"
|
||||||
|
echo "=> Installing make & automake & cmake & meson & ninja"
|
||||||
|
$TEA +gnu.org/make zsh -c "exit"
|
||||||
|
$TEA +gnu.org/automake zsh -c "exit"
|
||||||
|
$TEA +cmake.org zsh -c "exit"
|
||||||
|
$TEA +mesonbuild.com zsh -c "exit"
|
||||||
|
$TEA +ninja-build.org zsh -c "exit"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "=> Configuring \$PATH"
|
echo "=> Configuring \$PATH"
|
||||||
|
@ -66,10 +58,10 @@ done
|
||||||
|
|
||||||
echo "=> Installing dotfiles"
|
echo "=> Installing dotfiles"
|
||||||
git clone https://github.com/ivabus/ivabus-dotfiles ~/.env/dotfiles
|
git clone https://github.com/ivabus/ivabus-dotfiles ~/.env/dotfiles
|
||||||
sh ~/.env/dotfiles/tools/link_env.sh
|
|
||||||
ZSH="$HOME/.env/oh-my-zsh" sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended > /dev/null 2>&1
|
ZSH="$HOME/.env/oh-my-zsh" sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended > /dev/null 2>&1
|
||||||
curl -fsSL https://raw.githubusercontent.com/ivabus/ivabus-zsh-theme/master/ivabus.zsh-theme -o $HOME/.env/oh-my-zsh/custom/themes/ivabus.zsh-theme > /dev/null 2>&1
|
curl -fsSL https://raw.githubusercontent.com/ivabus/ivabus-zsh-theme/master/ivabus.zsh-theme -o $HOME/.env/oh-my-zsh/custom/themes/ivabus.zsh-theme > /dev/null 2>&1
|
||||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.env/oh-my-zsh/custom/plugins/zsh-syntax-highlighting > /dev/null 2>&1
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.env/oh-my-zsh/custom/plugins/zsh-syntax-highlighting > /dev/null 2>&1
|
||||||
|
sh ~/.env/dotfiles/tools/link_env.sh
|
||||||
|
|
||||||
echo "=> Environment installed to ~/.env"
|
echo "=> Environment installed to ~/.env"
|
||||||
echo " To start environment just type:"
|
echo " To start environment just type:"
|
||||||
|
|
|
@ -5,7 +5,7 @@ if [ -f ~/.zshrc ]; then
|
||||||
echo "=> Moving old zshrc to ~/.zshrc.old"
|
echo "=> Moving old zshrc to ~/.zshrc.old"
|
||||||
mv ~/.zshrc ~/.zshrc.old
|
mv ~/.zshrc ~/.zshrc.old
|
||||||
fi
|
fi
|
||||||
ln -s ~/.env/dotfiles/.zshrc ~/.zshrc
|
ln -s ~/.env/dotfiles/env/.zshrc ~/.zshrc
|
||||||
echo "=> Linking neovim files"
|
echo "=> Linking neovim files"
|
||||||
rm -rf ${XDG_CONFIG_HOME:-$HOME/.config}/nvim
|
rm -rf ${XDG_CONFIG_HOME:-$HOME/.config}/nvim
|
||||||
ln -s ~/.env/dotfiles/nvim ${XDG_CONFIG_HOME:-$HOME/.config}/nvim
|
ln -s ~/.env/dotfiles/nvim ${XDG_CONFIG_HOME:-$HOME/.config}/nvim
|
||||||
|
|
Loading…
Reference in a new issue