forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dotd
executable file
·96 lines (76 loc) · 2.76 KB
/
dotd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/usr/bin/env bash
# Try to autodetect real location of the script
if [ -z "$PROG_HOME" ] ; then
## resolve links - $0 may be a link to PROG_HOME
PRG="$0"
# need this for relative symlinks
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG="`dirname "$PRG"`/$link"
fi
done
saveddir=`pwd`
PROG_HOME=`dirname "$PRG"`/..
# make it fully qualified
PROG_HOME=`cd "$PROG_HOME" && pwd`
cd "$saveddir"
fi
source "$PROG_HOME/bin/common"
# Set dotty-doc dep:
DOTTY_DOC_LIB=$(find_lib "*dotty-doc*")
# Set flexmark deps:
FLEXMARK_LIBS=""
FLEXMARK_LIBS+=$(find_lib "*flexmark-0*")$PSEP
FLEXMARK_LIBS+=$(find_lib "*flexmark-formatter*")$PSEP
FLEXMARK_LIBS+=$(find_lib "*flexmark-ext-anchorlink*")$PSEP
FLEXMARK_LIBS+=$(find_lib "*flexmark-ext-autolink*")$PSEP
FLEXMARK_LIBS+=$(find_lib "*flexmark-ext-emoji*")$PSEP
FLEXMARK_LIBS+=$(find_lib "*flexmark-ext-gfm-strikethrough*")$PSEP
FLEXMARK_LIBS+=$(find_lib "*flexmark-ext-gfm-tables*")$PSEP
FLEXMARK_LIBS+=$(find_lib "*flexmark-ext-gfm-tasklist*")$PSEP
FLEXMARK_LIBS+=$(find_lib "*flexmark-ext-ins*")$PSEP
FLEXMARK_LIBS+=$(find_lib "*flexmark-ext-superscript*")$PSEP
FLEXMARK_LIBS+=$(find_lib "*flexmark-ext-tables*")$PSEP
FLEXMARK_LIBS+=$(find_lib "*flexmark-ext-wikilink*")$PSEP
FLEXMARK_LIBS+=$(find_lib "*flexmark-ext-yaml-front-matter*")$PSEP
FLEXMARK_LIBS+=$(find_lib "*flexmark-jira-converter*")$PSEP
FLEXMARK_LIBS+=$(find_lib "*flexmark-util*")
# Set jackson deps:
JACKSON_LIBS=""
JACKSON_LIBS+=$(find_lib "*jackson-annotations*")$PSEP
JACKSON_LIBS+=$(find_lib "*jackson-core*")$PSEP
JACKSON_LIBS+=$(find_lib "*jackson-databind*")$PSEP
JACKSON_LIBS+=$(find_lib "*jackson-dataformat-yaml*")
# Set liqp dep:
LIQP_LIB=$(find_lib "*liqp*")
# Set ANTLR dep:
ANTLR_LIB=$(find_lib "*antlr-3*")
ANTLR_RUNTIME_LIB=$(find_lib "*antlr-runtime-3*")
# Set autolink dep:
AUTOLINK_LIB=$(find_lib "*autolink-0.6*") # conflict with flexmark-ext-autolink-0.11
# Set snakeyaml dep:
SNAKEYAML_LIB=$(find_lib "*snakeyaml*")
# Set ST4 dep:
ST4_LIB=$(find_lib "*ST4*")
# Set jsoup dep:
JSOUP_LIB=$(find_lib "*jsoup*")
CLASS_PATH="$DOTTY_LIB$PSEP$DOTTY_COMP$PSEP$DOTTY_DOC_LIB$PSEP$DOTTY_INTF$PSEP$SBT_INTF"
CLASS_PATH="$CLASS_PATH$PSEP$SCALA_LIB"
CLASS_PATH="$CLASS_PATH$PSEP$FLEXMARK_LIBS"
CLASS_PATH="$CLASS_PATH$PSEP$JACKSON_LIBS"
CLASS_PATH="$CLASS_PATH$PSEP$LIQP_LIB"
CLASS_PATH="$CLASS_PATH$PSEP$ANTLR_LIB$PSEP$ANTLR_RUNTIME_LIB"
CLASS_PATH="$CLASS_PATH$PSEP$AUTOLINK_LIB"
CLASS_PATH="$CLASS_PATH$PSEP$SNAKEYAML_LIB"
CLASS_PATH="$CLASS_PATH$PSEP$ST4_LIB"
CLASS_PATH="$CLASS_PATH$PSEP$JSOUP_LIB"
eval exec "\"$JAVACMD\"" \
-Dscala.usejavacp=true \
"-classpath \"$CLASS_PATH\"" \
dotty.tools.dottydoc.Main \
$@
exit $?