Import: Handle uploads with sha1 starting with 0 properly
[mediawiki.git] / docs / kss / scripts / kss-node-check.sh
blob84ee1c4e5ae12d4024922806bb24dda51ded8523
1 #!/usr/bin/env bash
3 if command -v npm > /dev/null ; then
4 npm install
5 else
6 # If npm isn't installed, but kss-node is, exit normally.
7 # This allows setting it up on one machine, and running it on
8 # another (e.g. Tools Labs execution nodes) that doesn't have npm
9 # installed. However, "npm install" still needs to be run
10 # occasionally to keep kss updated.
12 KSS_NODE="${BASH_SOURCE%/*}/../node_modules/.bin/kss-node"
13 if ! [ -x "$KSS_NODE" ] ; then
14 echo "Neither kss-node nor npm are installed."
15 echo "To install npm, see http://nodejs.org/"
16 echo "When npm is installed, the Makefile can automatically"
17 echo "install kss-node."
18 exit 1