From 1756b102028dbf86f4c1f7d4cdcaaf4e03ac791e Mon Sep 17 00:00:00 2001 From: Morgan Wattiez Date: Fri, 1 Mar 2019 10:24:53 +0100 Subject: [PATCH] automate install for Docker Desktop --- README.md | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 58f3e25..ba6a74b 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,22 @@ sdk install gradle sdk install java 8.0.202-zulu ``` -### Download docker -`curl -o docker.dmg -sL https://download.docker.com/mac/stable/Docker.dmg` +### Install Docker Desktop for Mac +``` +docker_app=$(find /Applications/ \ + -name "Docker.app" -maxdepth 1 -mindepth 1 -type d) +if [ -z "$docker_app" ]; then + curl -o ~/Downloads/Docker.dmg -sL https://download.docker.com/mac/stable/Docker.dmg + hdiutil verify ~/Downloads/Docker.dmg + hdiutil attach ~/Downloads/Docker.dmg -nobrowse + cp -R /Volumes/Docker/Docker.app /Applications/ + hdiutil detach /Volumes/Docker + rm ~/Downloads/Docker.dmg + sudo /Applications/Docker.app/Contents/MacOS/Docker --quit-after-install --unattended +else + echo "Docker for Mac is already installed." +fi +``` ### Install dependencies with Brew `brew bundle` @@ -19,12 +33,12 @@ git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/theme gsed 's#ZSH_THEME="robbyrussell"#ZSH_THEME="powerlevel9k/powerlevel9k"#g' -i ~/.zshrc ``` -### install Meslo font +### install Meslo font Get it from `https://github.com/powerline/fonts/blob/master/Meslo%20Slashed/Meslo%20LG%20M%20Regular%20for%20Powerline.ttf` and configure it as default in iTerm2 Set this font in iTerm2 (14px is my personal preference) (iTerm → Preferences → Profiles → Text → Change Font). ### OSX Defaults ``` -defaults write http://com.apple .screencapture location ~/Download +defaults write http://com.apple .screencapture location ~/Downloads #defaults write com.apple.PowerChime ChimeOnNoHardware -bool true # still KO after closing lid #killall PowerChime ```