Skip to content

Commit

Permalink
chore(scripts): Support --no-install flag
Browse files Browse the repository at this point in the history
  • Loading branch information
evocateur committed Feb 9, 2021
1 parent d8100fd commit 126676a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions scripts/update_dependency.sh
@@ -1,7 +1,10 @@
#!/bin/sh

if [ "$#" -ne 1 ]; then
echo >&2 "Usage: $0 package-name"
# if you wanted to execute this script in a shell loop based on, say, npm outdated results (YMMV on cut depth for slashes):
# for pkg in $(npm outdated -p | cut -d ':' -f 1 | cut -d '/' -f 7-); do ./scripts/update_dependency.sh $pkg --no-install; done

if [ "$#" -lt 1 ]; then
echo >&2 "Usage: $0 package-name [--no-install]"
exit 1
fi

Expand Down Expand Up @@ -39,6 +42,8 @@ for file in $INFILES; do
echo "Finished editing: $file"
done

npm install
git add -u .
npm home $TARGET --no-browser
if [ "$2" != "--no-install" ]; then
npm install
git add -u .
npm home $TARGET --no-browser
fi

0 comments on commit 126676a

Please sign in to comment.