Commit | Line | Data |
---|---|---|
629a09ae DV |
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 | ||
33 | if [[ -n "$JSDOCDIR" ]]; then | |
34 | _DOCDIR="-Djsdoc.dir=$JSDOCDIR" | |
35 | _APPDIR="$JSDOCDIR/app" | |
36 | _BASEDIR="$JSDOCDIR" | |
37 | else | |
38 | _DOCDIR="" | |
39 | _APPDIR="./app" | |
40 | _BASEDIR="." | |
41 | fi | |
42 | ||
43 | if [[ -n "$JSDOCTEMPLATEDIR" ]]; then | |
44 | _TDIR="-Djsdoc.template.dir=$JSDOCTEMPLATEDIR" | |
45 | else | |
46 | _TDIR="" | |
47 | fi | |
48 | ||
49 | CMD="java $_DOCDIR $_TDIR -jar $_BASEDIR/jsrun.jar $_APPDIR/run.js $@" | |
50 | echo $CMD | |
51 | $CMD | |
52 |