etherpad-lite/src/bin/updatePlugins.sh
Richard Hansen 7bdd0f2f09 bin/updatePlugins.sh: Many refinements
* cd to top-level Etherpad directory is now more robust.
  * Only attempt to update packages whose names begin with `ep_`.
  * Don't create `package-lock.json`.
  * Improve logging.
  * Improve error handling.
2021-06-18 04:34:37 -04:00

11 lines
278 B
Bash
Executable file

#!/bin/sh
set -e
mydir=$(cd "${0%/*}" && pwd -P) || exit 1
cd "${mydir}"/../..
OUTDATED=$(npm outdated --depth=0 | awk '{print $1}' | grep '^ep_') || {
echo "All plugins are up-to-date"
exit 0
}
set -- ${OUTDATED}
echo "Updating plugins: $*"
exec npm install --no-save "$@"