summaryrefslogtreecommitdiff
path: root/docs/kss/scripts
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:12:12 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:12:12 -0400
commitc9aa36da061816dee256a979c2ff8d2ee41824d9 (patch)
tree29f7002b80ee984b488bd047dbbd80b36bf892e9 /docs/kss/scripts
parentb4274e0e33eafb5e9ead9d949ebf031a9fb8363b (diff)
parentd1ba966140d7a60cd5ae4e8667ceb27c1a138592 (diff)
Merge branch 'archwiki'
# Conflicts: # skins/ArchLinux.php # skins/ArchLinux/archlogo.gif
Diffstat (limited to 'docs/kss/scripts')
-rw-r--r--docs/kss/scripts/kss-node-check.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/kss/scripts/kss-node-check.sh b/docs/kss/scripts/kss-node-check.sh
new file mode 100644
index 00000000..84ee1c4e
--- /dev/null
+++ b/docs/kss/scripts/kss-node-check.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+if command -v npm > /dev/null ; then
+ npm install
+else
+ # If npm isn't installed, but kss-node is, exit normally.
+ # This allows setting it up on one machine, and running it on
+ # another (e.g. Tools Labs execution nodes) that doesn't have npm
+ # installed. However, "npm install" still needs to be run
+ # occasionally to keep kss updated.
+
+ KSS_NODE="${BASH_SOURCE%/*}/../node_modules/.bin/kss-node"
+ if ! [ -x "$KSS_NODE" ] ; then
+ echo "Neither kss-node nor npm are installed."
+ echo "To install npm, see http://nodejs.org/"
+ echo "When npm is installed, the Makefile can automatically"
+ echo "install kss-node."
+ exit 1
+ fi
+fi