Last active
October 22, 2022 00:27
-
-
Save definev/123815540bfacffa185201bd259e2632 to your computer and use it in GitHub Desktop.
bamboo ios install tool script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # save this script into "bamboo-ios" folder | |
| # run "bash tool_setup.sh" | |
| # Reset | |
| Color_Off='' | |
| # Regular Colors | |
| Red='' | |
| Green='' | |
| Dim='' # White | |
| # Bold | |
| Bold_White='' | |
| Bold_Green='' | |
| if [[ -t 1 ]]; then | |
| # Reset | |
| Color_Off='\033[0m' # Text Reset | |
| # Regular Colors | |
| Red='\033[0;31m' # Red | |
| Green='\033[0;32m' # Green | |
| Dim='\033[0;2m' # White | |
| # Bold | |
| Bold_Green='\033[1;32m' # Bold Green | |
| Bold_White='\033[1m' # Bold White | |
| fi | |
| error() { | |
| echo -e "${Red}error${Color_Off}:" "$@" >&2 | |
| exit 1 | |
| } | |
| info() { | |
| echo -e "${Dim}$@ ${Color_Off}" | |
| } | |
| info_bold() { | |
| echo -e "${Bold_White}$@ ${Color_Off}" | |
| } | |
| success() { | |
| echo -e "${Green}$@ ${Color_Off}" | |
| } | |
| FLUTTER_HOME="$HOME/Desktop" | |
| CURRENT_DIR="$PWD" | |
| if ! command -v flutter &> /dev/null | |
| then | |
| info_bold "Flutter not found in your computer" | |
| info "-|- Installing Flutter ..." | |
| cd "$FLUTTER_HOME" && | |
| git clone https://github.com/flutter/flutter.git -b stable && | |
| success "-|- Success installing flutter" | |
| commands=( | |
| "export PATH=\"$FLUTTER_HOME/flutter/bin:\$PATH\"" | |
| ) | |
| zsh_config=$HOME/.zshrc | |
| if [[ -w $zsh_config ]]; then | |
| { | |
| echo -e '\n# Flutter' | |
| for command in "${commands[@]}"; do | |
| echo "$command" | |
| done | |
| } >>"$zsh_config" | |
| success "-|- Added Flutter to \$PATH in $zsh_config" | |
| source $zsh_config | |
| fi | |
| fi | |
| cd "$CURRENT_DIR/delete_account_module" && | |
| flutter clean && | |
| flutter pub get | |
| say "Done setup tool for bamboo" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment