PageRenderTime 19ms CodeModel.GetById 11ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/jsdoc-toolkit/jsrun.sh

http://jsdoc-toolkit.googlecode.com/
Shell | 52 lines | 17 code | 7 blank | 28 comment | 2 complexity | d5baa63cb97bd28ac916a8f0d7f8ee74 MD5 | raw file
 1#!/bin/ksh
 2
 3# launcher script for jsdoc
 4# Author: Avi Deitcher
 5#
 6# This program is released under the MIT License as follows:
 7
 8# Copyright (c) 2008-2009 Atomic Inc <avi@jsorm.com>
 9#
10#Permission is hereby granted, free of charge, to any person
11#obtaining a copy of this software and associated documentation
12#files (the "Software"), to deal in the Software without
13#restriction, including without limitation the rights to use,
14#copy, modify, merge, publish, distribute, sublicense, and/or sell
15#copies of the Software, and to permit persons to whom the
16#Software is furnished to do so, subject to the following
17#conditions:
18##
19#The above copyright notice and this permission notice shall be
20#included in all copies or substantial portions of the Software.
21#
22#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23#EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
24#OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25#NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26#HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
27#WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28#FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
29#OTHER DEALINGS IN THE SOFTWARE.
30#
31
32
33if [[ -n "$JSDOCDIR" ]]; then
34        _DOCDIR="-Djsdoc.dir=$JSDOCDIR"
35        _APPDIR="$JSDOCDIR/app"
36	_BASEDIR="$JSDOCDIR"
37else
38        _DOCDIR=""
39        _APPDIR="./app"
40	_BASEDIR="."
41fi
42
43if [[ -n "$JSDOCTEMPLATEDIR" ]]; then
44        _TDIR="-Djsdoc.template.dir=$JSDOCTEMPLATEDIR"
45else
46        _TDIR=""
47fi
48
49CMD="java $_DOCDIR $_TDIR -jar $_BASEDIR/jsrun.jar $_APPDIR/run.js $@"
50echo $CMD
51$CMD
52