Skip to content

Instantly share code, notes, and snippets.

@suzuki-shunsuke
Created August 2, 2017 03:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suzuki-shunsuke/82f972dcb080182a7d26e78175c40db9 to your computer and use it in GitHub Desktop.
Save suzuki-shunsuke/82f972dcb080182a7d26e78175c40db9 to your computer and use it in GitHub Desktop.
nodebrew の nodeのバージョンアップするスクリプト
#!/usr/bin/env zsh
set -e
NODE_VERSION=$1
nodebrew install-binary $NODE_VERSION
nodebrew use $NODE_VERSION
PACKAGES=(
yo
yeoman-generator
generator-generator
yarn
)
npm i -g $PACKAGES
LINKS=(
flask
ansible-playbook
validate-commit-msg
standard-version
)
for LINK in "${LINKS[@]}"; do
ghq get suzuki-shunsuke/generator-ss-$LINK
cd `ghq root`/github.com/suzuki-shunsuke/generator-ss-$LINK
if [ -d node_modules ]; then
rm -R node_modules
fi
npm link
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment