From 6d8500b7c12beefa289e82143cf1f6f121b13f29 Mon Sep 17 00:00:00 2001 From: Morgan Wattiez Date: Thu, 25 Jul 2019 21:38:04 +0200 Subject: [PATCH] replace documentation with scripts --- README.md | 78 ++++++++++------------------------------ dot_scripts/bootstrap.sh | 48 +++++++++++++++++++++++++ dot_scripts/reload.sh | 6 ++++ dot_scripts/upgrade.sh | 12 +++++++ dot_zshrc | 2 +- 5 files changed, 85 insertions(+), 61 deletions(-) create mode 100755 dot_scripts/bootstrap.sh create mode 100644 dot_scripts/reload.sh create mode 100644 dot_scripts/upgrade.sh diff --git a/README.md b/README.md index 4d1ce77..4f634ac 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,26 @@ -### Use SDKMan to install development tools -``` -curl -s "https://get.sdkman.io" | bash -sdk install java -sdk install gradle -sdk install java 8.0.202-zulu -``` +### Run +run `.scripts/bootstrap.sh` -### Install Docker Desktop for Mac -``` -~/.scripts/executable_bootstrap.sh -``` +### Reload +run `zsh .scripts/reload.sh` -### Install dependencies (apps, fonts, ...) with Brew -`brew bundle` +### Upgrade +run `zsh .scripts/upgrade.sh` -### Install asciidoctor-pdf -`sudo gem install -n /usr/local/bin asciidoctor-pdf --pre` +### Scope +* Use SDKMan to install development tools +* Install Docker Desktop for Mac +* Install asciidoctor-pdf +* Install Oh My Zsh and some cool dependencies +* OSX Defaults +* Install NPM dependencies +* Install pip and pipenv +* Install AWS-CLI -### Install Oh My Zsh and some cool dependencies -``` -sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" -git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9 -git clone https://github.com/AlexisBRENON/oh-my-zsh-reminder ~/.oh-my-zsh/custom/plugins/reminder -git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting -git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions -``` -#### In order to upgrade it, just run -`upgrade_oh_my_zsh` +### If Yubico is installed, run this : +`sudo ansible-playbook ~/Code/dotfiles/macsecure_playbook.yaml` -### In cases of `\n` errors with zsh +#### In cases of `\n` errors with zsh https://github.com/robbyrussell/oh-my-zsh/issues/6764#issuecomment-384045008 ``` cd $ZSH @@ -37,38 +29,4 @@ git rm --cached -r . git reset --hard ``` -### OSX Defaults -``` -sudo sh .macos -``` - -### Install NPM dependencies -`npm install -g jira-node-cli` - -### Install pip and pipenv -``` -sudo easy_install pip -sudo pip install --upgrade pip - -curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py -sudo python3 get-pip.py -sudo pip3 install --upgrade pip -ln -s /usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/bin/pip pip3 -export PATH=$PATH:/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/bin/ -pip3 install pipenv -``` - -### Install AWS-CLI -``` -pip3 install boto3 -pip3 install awscli -``` - -### If Yubico is installed, run this : -`sudo ansible-playbook ~/Code/dotfiles/macsecure_playbook.yaml` - -## Upgrades - -### Upgrade dependencies with Brew -`brew outdated | xargs brew upgrade` diff --git a/dot_scripts/bootstrap.sh b/dot_scripts/bootstrap.sh new file mode 100755 index 0000000..0161c67 --- /dev/null +++ b/dot_scripts/bootstrap.sh @@ -0,0 +1,48 @@ +# Use SDKMan to install development tools +curl -s "https://get.sdkman.io" | bash +sdk install java +sdk install gradle +sdk install java 8.0.202-zulu + +# Install Docker Desktop for Mac +~/.scripts/executable_bootstrap.sh + +# Install dependencies (apps, fonts, ...) with Brew +brew bundle + +# Install asciidoctor-pdf +sudo gem install -n /usr/local/bin asciidoctor-pdf --pre + +# Install Oh My Zsh and some cool dependencies +sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" +git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9 +git clone https://github.com/AlexisBRENON/oh-my-zsh-reminder ~/.oh-my-zsh/custom/plugins/reminder +git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting +git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions + +# OSX Defaults +sudo sh .macos + +# Install NPM dependencies +npm install -g jira-node-cli --save + +# Install pip and pipenv +sudo easy_install pip +sudo pip install --upgrade pip + +curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py +sudo python3 get-pip.py +sudo pip3 install --upgrade pip +ln -s /usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/bin/pip pip3 +export PATH=$PATH:/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/bin/ +pip3 install pipenv + +# Install AWS-CLI +pip3 install boto3 +pip3 install awscli + +# Upgrade +upgrade.sh + +# Reload +reload.sh diff --git a/dot_scripts/reload.sh b/dot_scripts/reload.sh new file mode 100644 index 0000000..4db9bca --- /dev/null +++ b/dot_scripts/reload.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env zsh +source ~/.zshrc +sdk use java 8.0.202-zulu +brew bundle +# OSX Defaults +sudo sh .macos diff --git a/dot_scripts/upgrade.sh b/dot_scripts/upgrade.sh new file mode 100644 index 0000000..eef53ed --- /dev/null +++ b/dot_scripts/upgrade.sh @@ -0,0 +1,12 @@ +sdk selfupdate +brew update +#brew upgrade +brew outdated | xargs brew upgrade + +gem update --system +gem update asciidoctor-pdf +upgrade_oh_my_zsh +npm update -g jira-node-cli --save +sudo pip install --upgrade pip +sudo pip3 install --upgrade pip + diff --git a/dot_zshrc b/dot_zshrc index fec92d5..3fd18e5 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -105,6 +105,6 @@ sh ~/.scripts/resume.sh export SDKMAN_DIR="$HOME/.sdkman" [[ -s "$SDKMAN_DIR/bin/sdkman-init.sh" ]] && source "$SDKMAN_DIR/bin/sdkman-init.sh" -sdk use java 8.0.202-zulu +#sdk use java 8.0.202-zulu export PATH=$PATH:/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/bin/ export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"