8000 improve next steps echo output by jimkring · Pull Request #98 · tristanisham/zvm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

improve next steps echo output #98< 8000 /span>

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 18 additions & 19 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,32 +80,31 @@ elif [ $OS == "MINGW64_NT" ]; then
install_latest "zvm-windows-$ARCH.zip"
fi

echo
echo "Run the following commands to put ZVM on your path via $HOME/.profile"
echo
# Check if TERM is set to a value that typically supports colors
if [[ "$TERM" == "xterm" || "$TERM" == "xterm-256color" || "$TERM" == "screen" || "$TERM" == "tmux" ]]; then
# Colors
RED='\033[0;31m' # For strings
GREEN='\033[0;32m' # For commands
BLUE='\033[0;34m' # For variables
NC='\033[0m' # No Color

echo -e "${GREEN}echo${NC} ${RED}\"# ZVM\"${NC} ${GREEN}>>${NC} ${BLUE}\$HOME/.profile${NC}"
echo -e "${GREEN}echo${NC} ${RED}'export ZVM_INSTALL=\"\$HOME/.zvm/self\"'${NC} ${GREEN}>>${NC} ${BLUE}\$HOME/.profile${NC}"
echo -e "${GREEN}echo${NC} ${RED}'export PATH=\"\$PATH:\$HOME/.zvm/bin\"'${NC} ${GREEN}>>${NC} ${BLUE}\$HOME/.profile${NC}"
echo -e "${GREEN}echo${NC} ${RED}'export PATH=\"\$PATH:\$ZVM_INSTALL/\"'${NC} ${GREEN}>>${NC} ${BLUE}\$HOME/.profile${NC}"

echo -e "Run '${GREEN}source ~/.profile${NC}' to start using ZVM in this shell!"
echo "Run 'zvm i master' to install Zig"
else
echo 'echo "# ZVM" >> $HOME/.profile'
echo 'echo '\''export ZVM_INSTALL="$HOME/.zvm/self"'\'' >> $HOME/.profile'
echo 'echo '\''export PATH="$PATH:$HOME/.zvm/bin"'\'' >> $HOME/.profile'
echo 'echo '\''export PATH="$PATH:$ZVM_INSTALL/"'\'' >> $HOME/.profile'

echo "Run 'source ~/.profile' to start using ZVM in this shell!"
echo "Run 'zvm i master' to install Zig"
# No Colors (set to empty strings)
RED=''
GREEN=''
BLUE=''
NC=''
fi


echo
echo -e "Next steps to get started:"
echo
echo -e "1. Run the following commands to put ZVM on your \$PATH (via $HOME/.profile):"
echo
echo -e "${GREEN}echo${NC} ${RED}\"# ZVM\"${NC} ${GREEN}>>${NC} ${BLUE}\$HOME/.profile${NC}"
echo -e "${GREEN}echo${NC} ${RED}'export ZVM_INSTALL=\"\$HOME/.zvm/self\"'${NC} ${GREEN}>>${NC} ${BLUE}\$HOME/.profile${NC}"
echo -e "${GREEN}echo${NC} ${RED}'export PATH=\"\$PATH:\$HOME/.zvm/bin\"'${NC} ${GREEN}>>${NC} ${BLUE}\$HOME/.profile${NC}"
echo -e "${GREEN}echo${NC} ${RED}'export PATH=\"\$PATH:\$ZVM_INSTALL/\"'${NC} ${GREEN}>>${NC} ${BLUE}\$HOME/.profile${NC}"
echo
echo -e "2. Run '${GREEN}source ~/.profile${NC}' to start using ZVM in this shell!"
echo -e "3. Run '${GREEN}zvm i master${NC}' to install Zig"
echo
Loading
0