Skip to content
Permalink
Browse files

Zsh: Add better banners for installers

  • Loading branch information...
denysdovhan committed Sep 24, 2018
1 parent c2d7509 commit 6c99fe26f965943344b440a2aa121847eaf89b5f
Showing with 37 additions and 21 deletions.
  1. +1 βˆ’1 installer.sh
  2. +7 βˆ’0 scripts/brew.zsh
  3. +18 βˆ’0 scripts/nodejs.zsh
  4. +8 βˆ’8 scripts/update.zsh
  5. +0 βˆ’9 scripts/vscode.zsh
  6. +3 βˆ’3 sync.py
@@ -215,7 +215,7 @@ bootstrap() {
read -p "Would you like to bootstrap your environment? [y/N] " -n 1 answer
echo
if [ ${answer} != "y" ]; then
exit 1
return
fi

$DOTFILES/scripts/bootstrap.zsh
@@ -41,6 +41,12 @@ on_start() {
exit 1
fi

info ' ____ _____ '
info ' ____ ___ ____ _ _____ / __ \/ ___/ '
info ' / __ `__ \ / __ `// ___// / / /\__ \ '
info ' / / / / / // /_/ // /__ / /_/ /___/ / '
info ' /_/ /_/ /_/ \__,_/ \___/ \____//____/ '
info ' '
info "This script will guide you through installing macOS applications and cli tools."
echo "It will not install anything without your direct agreement!"
echo
@@ -96,6 +102,7 @@ main() {
brew_install wget
brew_install yarn
# Desktop applications
brew_install cask java
brew_install cask ukrainian-typographic-keyboard
brew_install cask gpg-suite
brew_install cask 1password
@@ -37,6 +37,23 @@ finish() {
sleep 1
}

on_start() {
info ' _ __ __ _ '
info ' / | / /____ ____/ /___ (_)_____ '
info ' / |/ // __ \ / __ // _ \ / // ___/ '
info ' / /| // /_/ // /_/ // __/_ / /(__ ) '
info ' /_/ |_/ \____/ \__,_/ \___/(_)__/ //____/ '
info ' /___/ '
info ' '
info "This script will guide you through installing Node.js, nvm, etc."
echo
ask "Do you want to proceed with installation?" && read answer
echo
if [[ "${answer}" != "y" ]]; then
exit 1
fi
}

install_node() {
info "Installing Node.js..."

@@ -117,6 +134,7 @@ on_error() {
}

main() {
on_start "$*"
install_node "$*"
install_nvm "$*"
configure_npm_init "$*"
@@ -43,14 +43,14 @@ finish() {
export DOTFILES=${1:-"$HOME/.dotfiles"}

on_start() {
info " __ __ ____ _ __ "
info " ____/ /____ / /_ / __/(_)/ /___ _____"
info " / __ // __ \ / __// /_ / // // _ \ / ___/"
info " _ / /_/ // /_/ // /_ / __// // // __/(__ ) "
info " (_)\__,_/ \____/ \__//_/ /_//_/ \___//____/ "
info " "
info " by @denysdovhan "
info " "
info ' __ __ ____ _ __ '
info ' ____/ /____ / /_ / __/(_)/ /___ _____ '
info ' / __ // __ \ / __// /_ / // // _ \ / ___/ '
info ' _ / /_/ // /_/ // /_ / __// // // __/(__ ) '
info ' (_)\__,_/ \____/ \__//_/ /_//_/ \___//____/ '
info ' '
info ' by @denysdovhan '
info ' '
}

update_dotfiles() {
@@ -1,14 +1,5 @@
#!/usr/bin/env zsh

# TODO:
# * check if code is available
# * if not available, then open it and show instructions how to enable.
# * if available, then install extensions
# * sync settings
# * install plugins

#!/usr/bin/env zsh

trap on_error SIGKILL SIGTERM

e='\033'
@@ -12,9 +12,9 @@
import shutil

# Get first, second an third arguments
arg1 = sys.argv[1] if 1 < len(sys.argv) else None
arg2 = sys.argv[2] if 2 < len(sys.argv) else None
arg3 = sys.argv[3] if 3 < len(sys.argv) else None
arg1 = sys.argv[1] if 1 < len(sys.argv) else None # Source
arg2 = sys.argv[2] if 2 < len(sys.argv) else None # Dest
arg3 = sys.argv[3] if 3 < len(sys.argv) else None # Backup

DOTFILES_DIR = os.path.dirname(os.path.abspath(__file__))
SOURCE_DIR = os.path.join(DOTFILES_DIR, arg1 or 'home')

0 comments on commit 6c99fe2

Please sign in to comment.
You can’t perform that action at this time.