summaryrefslogtreecommitdiff
path: root/bin/updatePlugins.sh
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2015-04-26 14:42:21 +0100
committerJohn McLear <john@mclear.co.uk>2015-04-26 14:42:21 +0100
commite1406b826b41f40b55d0816868444e5abd3efe09 (patch)
treef7692c80f10da059e42e793e82df8589a39eb5d7 /bin/updatePlugins.sh
parent254edffa9ca4deebef189c10b7846adca72024db (diff)
downloadetherpad-lite-e1406b826b41f40b55d0816868444e5abd3efe09.zip
cleaner update logic doesnt error when nothing to do
Diffstat (limited to 'bin/updatePlugins.sh')
-rwxr-xr-xbin/updatePlugins.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/updatePlugins.sh b/bin/updatePlugins.sh
index d696eca7..63c447ed 100755
--- a/bin/updatePlugins.sh
+++ b/bin/updatePlugins.sh
@@ -8,5 +8,13 @@ if [ -d "../bin" ]; then
cd "../"
fi
-npm outdated --depth=0 | grep -v "^Package" | awk '{print $1}' | xargs npm install $1 --save-dev
-
+# npm outdated --depth=0 | grep -v "^Package" | awk '{print $1}' | xargs npm install $1 --save-dev
+OUTDATED=`npm outdated --depth=0 | grep -v "^Package" | awk '{print $1}'`
+# echo $OUTDATED
+if test -n "$OUTDATED"; then
+ echo "Plugins require update, doing this now..."
+ echo "Updating $OUTDATED"
+ npm install $OUTDATED --save-dev
+else
+ echo "Plugins are all up to date"
+fi