Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Making sure gen_docs.sh looks for a globally installed copy of jasmin…

…e-node as well as local.
  • Loading branch information...
commit b74639e14a45eb9dac07c2d7b8e64780a42a478d 1 parent f7ac8ef
Jonathan Zacsh authored

Showing 1 changed file with 18 additions and 3 deletions. Show diff stats Hide diff stats

  1. +18 3 gen_docs.sh
21 gen_docs.sh
... ... @@ -1,4 +1,19 @@
1   -#!/bin/bash
2   -if [ ! -e gen_docs.disable ]; then
3   - ./node_modules/.bin/jasmine-node docs/spec --noColor && node docs/src/gen-docs.js
  1 +#!/usr/bin/env bash
  2 +
  3 +JASMINE_NODE='jasmine-node'
  4 +if ! type -p "$JASMINE_NODE" >/dev/null 2>&1;then
  5 + # Locally (npm)-installed jasmine-node
  6 + local_jasmine='./node_modules/.bin/jasmine-node'
  7 +
  8 + if [[ -x "$local_jasmine" ]];then
  9 + JASMINE_NODE="$local_jasmine"
  10 + else
  11 + echo 'Could not find a locally or globally installed executable of' \
  12 + 'jasmine-node. Try: `npm install jasmine-node`.' >&2
  13 + exit 1
  14 + fi
  15 +fi
  16 +
  17 +if [[ ! -e gen_docs.disable ]]; then
  18 + "$JASMINE_NODE" docs/spec --noColor && node docs/src/gen-docs.js
4 19 fi

0 comments on commit b74639e

Please sign in to comment.
Something went wrong with that request. Please try again.