Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Greatly simplify the full jar generation
[simgrid.git] / tools / cmake / scripts / java_bundle.sh
1 #!/bin/sh
2
3 set -e
4 set -x
5
6 if [ $# -lt 2 ]; then
7     cat >&2 <<EOF
8 Usage: $0 simgrid.jar java_command strip_command [file.so...]
9     java_command   path to the Java runtime
10     simgrid.jar    SimGrid jar file
11     file.so        library file to strip and bundle into the archive
12 EOF
13     exit 1
14 fi
15
16 JAVA=$1
17 shift
18 SIMGRID_JAR=$1
19 shift
20
21 JSG_BUNDLE=$("$JAVA" -classpath "$SIMGRID_JAR" org.simgrid.NativeLib --quiet)
22
23 # prepare directory
24 rm -fr NATIVE
25 mkdir -p "$JSG_BUNDLE"
26 cp $* "$JSG_BUNDLE"
27