mirror of
https://github.com/ivabus/dotfiles
synced 2024-11-21 23:55:07 +03:00
Add colors
This commit is contained in:
parent
9364f686ff
commit
e231498176
1 changed files with 28 additions and 25 deletions
53
tools/env.sh
53
tools/env.sh
|
@ -1,48 +1,51 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "=> This script will create small environment"
|
||||
NC='\033[0m'
|
||||
Green='\033[1;32m'
|
||||
ARROW="${Green}=>${NC}"
|
||||
INPUT="${Green}::${NC}"
|
||||
|
||||
echo "${ARROW} This script will create small environment"
|
||||
echo " with dotfiles from ivabus/ivabus-dotfiles"
|
||||
echo ":: Press enter for continue"
|
||||
echo "${INPUT} Press enter to continue"
|
||||
read
|
||||
|
||||
echo "=> Installing env to ~/.env"
|
||||
echo "${ARROW} Installing env to ~/.env"
|
||||
mkdir -p ~/.env/bin > /dev/null 2>&1
|
||||
|
||||
TEA_PREFIX=~/.env/tea
|
||||
TEA=~/.env/tea/tea.xyz/v0.18.0/bin/tea
|
||||
TEA=~/.env/tea/tea.xyz/v0/bin/tea
|
||||
PATH=$PATH
|
||||
|
||||
echo "=> 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
|
||||
PATH="$HOME/.env/bin:$PATH"
|
||||
|
||||
echo "=> Installing tea"
|
||||
zsh -c "TEA_PREFIX=~/.env/tea YES=1 sh <(curl https://tea.xyz)"
|
||||
echo "=> Installing neovim"
|
||||
echo "${ARROW} Installing tea"
|
||||
zsh -c "sh <(curl https://tea.xyz) --prefix $TEA_PREFIX --yes"
|
||||
|
||||
echo "${ARROW} Installing neovim"
|
||||
$TEA +neovim.io zsh -c "exit"
|
||||
echo "=> Installing htop"
|
||||
echo "${ARROW} Installing htop"
|
||||
$TEA +htop.dev zsh -c "exit"
|
||||
echo "${ARROW} Installing git"
|
||||
$TEA +git-scm.org zsh -c "exit"
|
||||
|
||||
|
||||
echo -n ":: Would you like to install compilers/interpretators (LLVM, Rust, Python)? (y/N): "
|
||||
read INSTALL_COMPILERS
|
||||
read -p "${INPUT} Would you like to install compilers/interpretators (LLVM, Rust, Python)? (y/N): " INSTALL_COMPILERS
|
||||
if [[ $INSTALL_COMPILERS == "y" || $INSTALL_COMPILERS == "Y" ]]; then
|
||||
echo "=> Installing rust"
|
||||
echo "${ARROW} Installing rust"
|
||||
$TEA +rust-lang.org zsh -c "exit"
|
||||
echo "=> Installing llvm"
|
||||
echo "${ARROW} Installing llvm"
|
||||
$TEA +llvm.org zsh -c "exit"
|
||||
echo "=> Installing python"
|
||||
echo "${ARROW} Installing python"
|
||||
$TEA +python.org zsh -c "exit"
|
||||
fi
|
||||
|
||||
echo -n ":: Would you like to install development tools (git, github cli, make/cmake/meson/ninja)? (y/N): "
|
||||
read INSTALL_TOOLS
|
||||
read -p "${INPUT} Would you like to install development tools (GitHub CLI, make/cmake/meson/ninja)? (y/N): " INSTALL_TOOLS
|
||||
if [[ $INSTALL_TOOLS == "y" || $INSTALL_TOOLS == "Y" ]]; then
|
||||
echo "=> Installing git"
|
||||
$TEA +git-scm.org zsh -c "exit"
|
||||
echo "=> Installing GitHub CLI"
|
||||
echo "${ARROW} Installing GitHub CLI"
|
||||
$TEA +cli.github.com zsh -c "exit"
|
||||
echo "=> Installing make & automake & cmake & meson & ninja"
|
||||
echo "${ARROW} 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"
|
||||
|
@ -50,19 +53,19 @@ if [[ $INSTALL_TOOLS == "y" || $INSTALL_TOOLS == "Y" ]]; then
|
|||
$TEA +ninja-build.org zsh -c "exit"
|
||||
fi
|
||||
|
||||
echo "=> Configuring \$PATH"
|
||||
echo "${ARROW} Configuring \$PATH"
|
||||
for i in "tea" "nvim" "clang" "clang++" "lldb" "rustc" "cargo" "htop" "make" "cmake" "automake" "meson" "ninja" "git" "gh"
|
||||
do
|
||||
ln -s $TEA ~/.env/bin/$i
|
||||
done
|
||||
|
||||
echo "=> Installing dotfiles"
|
||||
echo "${ARROW} Installing dotfiles"
|
||||
git clone https://github.com/ivabus/ivabus-dotfiles ~/.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
|
||||
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
|
||||
sh ~/.env/dotfiles/tools/link_env.sh
|
||||
|
||||
echo "=> Environment installed to ~/.env"
|
||||
echo "${ARROW} Environment installed to ~/.env"
|
||||
echo " To start environment just type:"
|
||||
echo " PATH=\"\$HOME/.env/bin:\$PATH\" zsh"
|
||||
echo " PATH=\"\$HOME/.env/bin:\$PATH\" zsh"
|
Loading…
Reference in a new issue