lumiere-server/compile.sh
2023-04-14 07:26:04 +03:00
Ask

29 lines
597 B
Bash
Executable File

{799914c4c60810d6602767f83d43bb8bac412f22 true 597 compile.sh 0xc002bba150}

#!/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