summaryrefslogtreecommitdiff
path: root/bin/updatePlugins.sh
blob: 63c447edf3f383f7dd87fe739cd2cc4af9da7de3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

#Move to the folder where ep-lite is installed
cd `dirname $0`

#Was this script started in the bin folder? if yes move out
if [ -d "../bin" ]; then
  cd "../"
fi

# 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