etherpad-lite/bin/updatePlugins.sh
muxator a181ea8fbe bin: replace double backticks (``) with $()
This has been the recommended way of launching subshells for ages, and is easier
to type and on the eye.

For a quick reference, see:
https://unix.stackexchange.com/questions/5778/whats-the-difference-between-stuff-and-stuff#5782
2020-03-29 00:53:17 +01:00

20 lines
554 B
Bash
Executable file

#!/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