Update env.sh

This commit is contained in:
Ivan Bushchik 2023-06-25 15:53:33 +03:00
parent 80174428e8
commit ca4efb6367
No known key found for this signature in database
GPG key ID: 9F6DDABE11A2674D

View file

@ -25,17 +25,19 @@ echo " with dotfiles from ivabus/dotfiles"
echo "${INPUT} Press enter to continue" echo "${INPUT} Press enter to continue"
read read
rm -rf $HOME/.env &> /dev/null
if [ $INSTALL_BIN_TOOLS = "1" ] if [ $INSTALL_BIN_TOOLS = "1" ]
then then
echo "${ARROW} Installing env to ~/.env" echo "${ARROW} Installing env to $HOME/.env"
mkdir ~/.env ~/.env/bin > /dev/null 2>&1 mkdir $HOME/.env $HOME/.env/bin > /dev/null 2>&1
TEA_PREFIX=~/.env/tea TEA_PREFIX=$HOME/.env/tea
TEA=~/.env/tea/tea.xyz/v0/bin/tea TEA=$HOME/.env/tea/tea.xyz/v0/bin/tea
PATH=$PATH PATH=$PATH
echo "${ARROW} Installing static zsh" echo "${ARROW} Installing static zsh"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)" -q -d ~/.env -e no sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)" -q -d $HOME/.env -e no
PATH="$HOME/.env/bin:$PATH" PATH="$HOME/.env/bin:$PATH"
echo "${ARROW} Installing tea" echo "${ARROW} Installing tea"
@ -74,19 +76,19 @@ fi
echo "${ARROW} Configuring \$PATH" echo "${ARROW} Configuring \$PATH"
for i in "tea" "nvim" "clang" "clang++" "lldb" "rustc" "cargo" "htop" "make" "cmake" "automake" "meson" "ninja" "git" "gh" for i in "tea" "nvim" "clang" "clang++" "lldb" "rustc" "cargo" "htop" "make" "cmake" "automake" "meson" "ninja" "git" "gh"
do do
ln -s $TEA ~/.env/bin/$i ln -s $TEA $HOME/.env/bin/$i
done done
fi fi
echo "${ARROW} Installing dotfiles" echo "${ARROW} Installing dotfiles"
$TEA git clone https://github.com/ivabus/dotfiles ~/.env/dotfiles $TEA git clone https://github.com/ivabus/dotfiles $HOME/.env/dotfiles
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 sh $HOME/.env/dotfiles/tools/link_env.sh
echo "${ARROW} Environment installed to ~/.env" echo "${ARROW} Environment installed to $HOME/.env"
if [ $INSTALL_BIN_TOOLS = "1" ] if [ $INSTALL_BIN_TOOLS = "1" ]
then then
echo " To start environment just type:" echo " To start environment just type:"