-
Notifications
You must be signed in to change notification settings - Fork 1
/
compile.sh
executable file
·35 lines (26 loc) · 1.11 KB
/
compile.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
#!/bin/bash
# Removes the previous jar files.
echo "[$(date)] Removing previous jar files..."
rm -f *.jar
# Finds all the Java classes to be compiled.
echo "[$(date)] Finding the source files to be compiled..."
find -name "*.java" > sources.txt
# Creates bin directory, if it does not exists.
echo "[$(date)] Creating build directory, if one does not exist..."
[ -d "bin" ] && echo "[$(date)] Directory bin exists." || mkdir bin
# Compiles the files.
echo "[$(date)] Compiling the source files..."
javac -d bin @sources.txt
# Removes the file source.txt, that contains the list of the Java sources files.
echo "[$(date)] Removing temporary file sources.txt..."
rm -f sources.txt
# Creates jar file for Incremental HDBSCAN*.
echo "[$(date)] Creating jar file for Incremental HDBSCAN*..."
jar -cfm IHDBSCAN.jar IHDBSCAN.MF -C bin/ .
# Creates jar file for HDBSCAN*.
echo "[$(date)] Creating jar file for HDBSCAN*..."
jar -cfm HDBSCAN.jar HDBSCAN.MF -C bin/ .
# Copies the jar files to the experiments directory.
echo "[$(date)] Copying the jar files to the experiments directory..."
mv *.jar experiments/
echo "[$(date)] DONE!"