mirror of
https://github.com/ivabus/dotfiles
synced 2024-11-10 02:05:16 +03:00
Add colors
This commit is contained in:
parent
9364f686ff
commit
e231498176
51
tools/env.sh
51
tools/env.sh
|
@ -1,48 +1,51 @@
|
||||||
#!/bin/sh
|
#!/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 " with dotfiles from ivabus/ivabus-dotfiles"
|
||||||
echo ":: Press enter for continue"
|
echo "${INPUT} Press enter to continue"
|
||||||
read
|
read
|
||||||
|
|
||||||
echo "=> Installing env to ~/.env"
|
echo "${ARROW} 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.18.0/bin/tea
|
TEA=~/.env/tea/tea.xyz/v0/bin/tea
|
||||||
PATH=$PATH
|
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
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh-bin/master/install)" -q -d ~/.env -e no
|
||||||
PATH="$HOME/.env/bin:$PATH"
|
PATH="$HOME/.env/bin:$PATH"
|
||||||
|
|
||||||
echo "=> Installing tea"
|
echo "${ARROW} Installing tea"
|
||||||
zsh -c "TEA_PREFIX=~/.env/tea YES=1 sh <(curl https://tea.xyz)"
|
zsh -c "sh <(curl https://tea.xyz) --prefix $TEA_PREFIX --yes"
|
||||||
echo "=> Installing neovim"
|
|
||||||
|
echo "${ARROW} Installing neovim"
|
||||||
$TEA +neovim.io zsh -c "exit"
|
$TEA +neovim.io zsh -c "exit"
|
||||||
echo "=> Installing htop"
|
echo "${ARROW} Installing htop"
|
||||||
$TEA +htop.dev zsh -c "exit"
|
$TEA +htop.dev zsh -c "exit"
|
||||||
|
echo "${ARROW} Installing git"
|
||||||
|
$TEA +git-scm.org zsh -c "exit"
|
||||||
|
|
||||||
|
read -p "${INPUT} Would you like to install compilers/interpretators (LLVM, Rust, Python)? (y/N): " INSTALL_COMPILERS
|
||||||
echo -n ":: Would you like to install compilers/interpretators (LLVM, Rust, Python)? (y/N): "
|
|
||||||
read INSTALL_COMPILERS
|
|
||||||
if [[ $INSTALL_COMPILERS == "y" || $INSTALL_COMPILERS == "Y" ]]; then
|
if [[ $INSTALL_COMPILERS == "y" || $INSTALL_COMPILERS == "Y" ]]; then
|
||||||
echo "=> Installing rust"
|
echo "${ARROW} Installing rust"
|
||||||
$TEA +rust-lang.org zsh -c "exit"
|
$TEA +rust-lang.org zsh -c "exit"
|
||||||
echo "=> Installing llvm"
|
echo "${ARROW} Installing llvm"
|
||||||
$TEA +llvm.org zsh -c "exit"
|
$TEA +llvm.org zsh -c "exit"
|
||||||
echo "=> Installing python"
|
echo "${ARROW} Installing python"
|
||||||
$TEA +python.org zsh -c "exit"
|
$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): "
|
read -p "${INPUT} Would you like to install development tools (GitHub CLI, make/cmake/meson/ninja)? (y/N): " INSTALL_TOOLS
|
||||||
read INSTALL_TOOLS
|
|
||||||
if [[ $INSTALL_TOOLS == "y" || $INSTALL_TOOLS == "Y" ]]; then
|
if [[ $INSTALL_TOOLS == "y" || $INSTALL_TOOLS == "Y" ]]; then
|
||||||
echo "=> Installing git"
|
echo "${ARROW} Installing GitHub CLI"
|
||||||
$TEA +git-scm.org zsh -c "exit"
|
|
||||||
echo "=> Installing GitHub CLI"
|
|
||||||
$TEA +cli.github.com zsh -c "exit"
|
$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/make zsh -c "exit"
|
||||||
$TEA +gnu.org/automake zsh -c "exit"
|
$TEA +gnu.org/automake zsh -c "exit"
|
||||||
$TEA +cmake.org 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"
|
$TEA +ninja-build.org zsh -c "exit"
|
||||||
fi
|
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"
|
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 ~/.env/bin/$i
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "=> Installing dotfiles"
|
echo "${ARROW} Installing dotfiles"
|
||||||
git clone https://github.com/ivabus/ivabus-dotfiles ~/.env/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
|
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 ~/.env/dotfiles/tools/link_env.sh
|
||||||
|
|
||||||
echo "=> Environment installed to ~/.env"
|
echo "${ARROW} Environment installed to ~/.env"
|
||||||
echo " To start environment just type:"
|
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