forked from tmtsoftware/csw-prototype
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·41 lines (29 loc) · 1.12 KB
/
install.sh
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
#!/bin/sh
#
# Creates a single install directory from all the csw stage directories.
dir=../install
hash sbt 2>/dev/null || { echo >&2 "Please install sbt first. Aborting."; exit 1; }
stage=target/universal/stage
for i in bin lib conf doc ; do
test -d $dir/$i || mkdir -p $dir/$i
done
sbt compile
# Ignore the error messages generated by unidoc
echo "Generating unified Scala/Java API docs..."
sbt -Dcsw.genjavadoc.enabled=true unidoc > /dev/null 2>&1
sbt publish-local stage
for i in bin lib ; do
for j in */target/universal/stage/$i/* apps/*/target/universal/stage/$i/* examples/*/target/universal/stage/$i/* ; do
cp -f $j $dir/$i
done
done
cp scripts/*.sh $dir/bin
chmod +x $dir/bin/*.sh
rm -rf $dir/doc/*
cp -r target/javaunidoc/ $dir/doc/java
cp -r target/scala-2.11/unidoc/ $dir/doc/scala
rm -f $dir/bin/*.log.* $dir/bin/*.bat
# create the scalas script, for scala scriping (see http://www.scala-sbt.org/release/docs/Scripts.html)
# Note: This depends on the sbt version declared in project/build.properties (0.13.8).
echo 'sbt -Dsbt.main.class=sbt.ScriptMain "$@"' > $dir/bin/scalas
chmod +x $dir/bin/scalas