Last active
March 23, 2020 07:51
-
-
Save yatishbalaji/255ba1a3c0f8135e04f630c8b2518625 to your computer and use it in GitHub Desktop.
loop over all projects in directory and run npm i
This file contains hidden or 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
| for f in ~/yatish/projects/*; | |
| do | |
| if [ -d $f ]; then | |
| echo Entering into $f && cd "$f"; | |
| if [ ! -d "node_modules" ]; then | |
| [ -f "package.json" ] && echo "Installing" && npm i; | |
| fi | |
| if [ -d "lambda" ]; then | |
| echo "Entering lambda" && cd lambda && [ ! -d "node_modules" ] && [ -f "package.json" ] && echo "Installing lambda" && npm i; | |
| fi | |
| fi | |
| done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment