Skip to content

Instantly share code, notes, and snippets.

@kouks
Last active December 27, 2018 11:06
Show Gist options
  • Select an option

  • Save kouks/9cdd214afdfc11689c0e35c78d6d0cbd to your computer and use it in GitHub Desktop.

Select an option

Save kouks/9cdd214afdfc11689c0e35c78d6d0cbd to your computer and use it in GitHub Desktop.
Perform commands in all one-level subdirectories.
#!/bin/bash
libs=(support ioc aop events exceptions core storage messaging tabs cache compatibility management)
cd framework/lib
git checkout develop
for lib in ${libs[@]}; do
cd ${lib}
# Start commands, use ${lib} to refer to the current package.
rm -rf node_modules package-lock.json
if ! npm i || ! npm run build || ! npm run test
then
exit 1
fi
# End commands.
cd ..
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment