From 9994faca39a8ed2e8e3955c1396233e9a92ec34f Mon Sep 17 00:00:00 2001 From: Morgan Wattiez Date: Fri, 1 Mar 2019 14:13:21 +0100 Subject: [PATCH] remove manual install step for docker --- README.md | 14 +------------- dot_scripts/executable_bootstrap.sh | 12 ++++++++++++ dot_zshrc | 1 + 3 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 dot_scripts/executable_bootstrap.sh diff --git a/README.md b/README.md index 42c7997..f9ba604 100644 --- a/README.md +++ b/README.md @@ -8,19 +8,7 @@ sdk install java 8.0.202-zulu ### 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 +~/.scripts/bootstrap.sh ``` ### Install dependencies (apps, fonts, ...) with Brew diff --git a/dot_scripts/executable_bootstrap.sh b/dot_scripts/executable_bootstrap.sh new file mode 100644 index 0000000..ebabfa2 --- /dev/null +++ b/dot_scripts/executable_bootstrap.sh @@ -0,0 +1,12 @@ +docker_app=$(find /Applications/ \ + -name "Docker.app" -maxdepth 1 -mindepth 1 -type d) +if [ -z "$docker_app" ]; then + echo "Installation of Docker for Mac" + 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 +fi diff --git a/dot_zshrc b/dot_zshrc index d0d6092..320db17 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -92,6 +92,7 @@ source $ZSH/oh-my-zsh.sh # For a full list of active aliases, run `alias`. . ~/.zsh_aliases . ~/.zsh_functions +. ~/.scripts/bootstrap.sh #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! https://github.com/sdkman/sdkman-cli/issues/613 export SDKMAN_DIR="$HOME/.sdkman"