mirror of
https://github.com/devsnaith/lumiere-server.git
synced 2024-11-23 17:13:14 +03:00
Create compile method
This commit is contained in:
parent
24370dcb89
commit
1397f4b8ee
28
compile.sh
Executable file
28
compile.sh
Executable file
@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
which javac &> /dev/null
|
||||
if [ ! $? -eq 0 ]; then
|
||||
echo "Need javac to compile the project"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "./build" ]; then
|
||||
echo "Creating ./build Folder"
|
||||
mkdir ./build
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "./build has been created"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Generating source..."
|
||||
SOURCE=$(find ./src/ | grep ".java")
|
||||
echo $SOURCE | tr " " "\n"
|
||||
echo "Start compiling..."
|
||||
javac -verbose $SOURCE -d ./build
|
||||
echo "Generating jar file..."
|
||||
jar cvfe lumiere-server.jar org/eu/lumiere/Lumiere -C build .
|
||||
|
||||
if [ -f ./lumiere-server.jar ]; then
|
||||
echo "lumiere-server jar hes been created"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user