Created
February 21, 2019 13:56
-
-
Save mafintosh/10fb254103bf727cf136460002b79e62 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm-clone () { | |
if echo $1 | grep '/' >/dev/null; then | |
git clone git@github.com:$1.git | |
else | |
git clone git@github.com:mafintosh/$1.git | |
fi | |
cd $(echo $1 | sed 's|.*/||') | |
[ -f "package.json" ] && npm install | |
cd .. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment