Skip to content

Commit

Permalink
added more user feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
bretonics committed Mar 27, 2018
1 parent eb14024 commit ee86868
Showing 1 changed file with 49 additions and 74 deletions.
123 changes: 49 additions & 74 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,52 +1,70 @@
#!/usr/bin/env bash

printf "\nINFO: This script will automate a lot of processes.\n"
echo "Press ctrl-c to stop now. "
sleep 5
echo "Though not recommended to interrupt, exit this script at any time with ctrl-c."
echo ""
echo "INFO: This script will automate a lot of processes."
echo "Though not recommended to interrupt, exit this script at any time with Ctrl-C."
echo "Press Ctrl-C to STOP now."
sleep 5
echo "Starting automation...."


#-------------------------------------------------------------------------------
# System Setup
printf "\n\nInstalling Homebrew\n"
echo ""
echo ""
echo "================================================================================"
echo "Script: $0"
echo "Run by: `whoami`"
echo "On: `date`"
echo "PID: $$"
echo "================================================================================"
echo ""
echo ""
echo ""

#--------------------------------------------------------------------------------
# SYSTEM SETUP
echo "Installing Homebrew"
printf "================================================================================\n\n"

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" </dev/null

printf "\n\nDone installing Homebrew.\n\n\n"
sleep 2

echo "Installing Xcode developer tools"
printf "================================================================================\n\n"

xcode-select --install

printf "\n\nDone installing Xcode developer tools.\n\n\n"
sleep 2

#-------------------------------------------------------------------------------
# Install All Desired Formulae
echo "Installing formulas"
printf "================================================================================\n\n"
#--------------------------------------------------------------------------------
# INSTALL ALL DESIRED FORMULAE
echo "Installing formulae"
printf "================================================================================\n"

formulae="asciinema bcftools blast bowtie2 dos2unix gcc git-lfs glances htop hugo imagemagick mas mongodb mysql neofetch openssl rename ssh-copy-id pandoc pandoc-citeproc pkg-config python3 r rbenv readline rename ruby samtools seqtk speedtest-cli sratoolkit tree vcftools xz"

for formula in $formulae
do
printf "\nInstalling $formula\n"
brew install $formula
done

printf "\n\nDone installing formulas.\n\n\n"
sleep 2

#-------------------------------------------------------------------------------
# Install All Desired Casks (3rd Party Apps)
#--------------------------------------------------------------------------------
# INSTALL ALL DESIRED CASKS (3RD PARTY APPS)
echo "Installing casks"
printf "================================================================================\n\n"
printf "================================================================================\n"

casks="atom alfred dropbox rstudio flux brackets mactex java gitify google-backup-and-sync google-chrome google-drive-file-stream igv spotify virtualbox xquartz"

for cask in $casks
do
printf "\nInstalling $cask\n"
brew cask install $cask
# Handle apps requiring authentication step
if [ "$cask" == "virtualbox" ]; then
echo "HOLDING to handle $cask prompt...."
sleep 30
Expand All @@ -60,84 +78,41 @@ done
printf "\n\nDone installing casks.\n\n\n"
sleep 2

#-------------------------------------------------------------------------------
# Personalized Setup
# echo "Symlinking Atom config directory"
# ln -sf ~/Dropbox/Apps/Atom/ ~/.atom

#-------------------------------------------------------------------------------
# Updates
echo "Running updates"
#--------------------------------------------------------------------------------
# CLEANUP
echo "Cleaning up"
printf "================================================================================\n\n"
echo "Updating Atom"
apm upgrade -c false

printf "\n\nDone running updates.\n\n\n"
sleep 2
echo "Turn OFF sending brew analytics"
brew analytics off

#-------------------------------------------------------------------------------
# Cleanup
echo "Cleaning up"
printf "================================================================================\n\n"
echo "Cleaning up Homebrew downloads and caches"
brew cleanup -s # remove older versions in cellar + old downloads-cache
rm -rf $(brew --cache) # delete all

printf "\n\nDone cleaning up.\n\n\n"
sleep 2

#-------------------------------------------------------------------------------
# Install Mac Apps
#--------------------------------------------------------------------------------
# INSTALL MAC APPS
echo "Installing apps from Mac App Store"
printf "================================================================================\n\n"
apps=""
# 414528154 ScreenFloat
# 530461386 Yummy FTP Watcher
# 1044630224 Calendar 366 Plus
# 915542151 Monity
# 492068728 Yummy FTP
# 409183694 Keynote
# 465965038 Markdown Pro
# 456609775 Window Tidy
# 1278508951 Trello
# 524373870 Due
# 418073146 Snap
# 695406827 Dropzone 3
# 409789998 Twitter
# 937984704 Amphetamine
# 443987910 1Password
# 1035237815 Commander One PRO
# 409203825 Numbers
# 412448059 ForkLift
# 409201541 Pages
# 1130254674 CloudMounter
# 919797974 PullRequestMenu
# 803453959 Slack
# 457622435 Yoink
# 445189367 PopClip
# 928494006 PopHub
# 507257563 Sip
printf "================================================================================\n"

apps=""
for app in $apps
do
echo "Installing $app\n"
printf "\nInstalling $app\n"
mas install $app
done

printf "\n\nDone installing Mac App Store apps.\n\n\n"
sleep 2


printf "================================================================================\n"
echo "Now go login to accounts (Dropbox, emails, etc...) and then run secondary installs, `sh secondary.sh`."
echo ""
echo ""
echo "================================================================================"
echo "Setup has FINISHED"
printf "================================================================================\n"

# progress bar
# chars="/-\|"
#
# while :; do
# for (( i=0; i<${#chars}; i++ )); do
# sleep 0.5
# echo -en "${chars:$i:1}" "\r"
# done
# done
echo "================================================================================"
echo ""

0 comments on commit ee86868

Please sign in to comment.