diff --git a/META-INF/MANIFEST.MF b/META-INF/MANIFEST.MF deleted file mode 100644 index a92d6b1..0000000 --- a/META-INF/MANIFEST.MF +++ /dev/null @@ -1,4 +0,0 @@ -Manifest-Version: 1.0 -Main-Class: sig.PolygonFill -Created-By: 11.0.13 (Azul Systems, Inc.) - diff --git a/PolygonFill.jar b/PolygonFill.jar index 79e3d01..647d796 100644 Binary files a/PolygonFill.jar and b/PolygonFill.jar differ diff --git a/bin/PolygonFill.jar b/bin/PolygonFill.jar deleted file mode 100644 index 245daa3..0000000 Binary files a/bin/PolygonFill.jar and /dev/null differ diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 0000000..5303265 --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,6 @@ +rm -Rf out/* +javac -Xlint:unchecked -cp ${PROJECT_DIR}/.. -d ${OUT_DIR} ${PROJECT_DIR}/*.java +printf "\n\n\nRunning Program...\n\n" +cd $OUT_DIR +java ${MAIN_CLASS} "$@" +../scripts/clean.sh \ No newline at end of file diff --git a/scripts/clean.sh b/scripts/clean.sh new file mode 100755 index 0000000..c0259b7 --- /dev/null +++ b/scripts/clean.sh @@ -0,0 +1,2 @@ +find . -type f -name *.class -delete +find . -type f -name manifest -delete \ No newline at end of file diff --git a/scripts/commit.sh b/scripts/commit.sh new file mode 100755 index 0000000..a9a8092 --- /dev/null +++ b/scripts/commit.sh @@ -0,0 +1,4 @@ +git add -u +git add * +git commit -m "$*" +git push \ No newline at end of file diff --git a/run b/scripts/jar.sh similarity index 52% rename from run rename to scripts/jar.sh index 220e0c4..14f8caf 100755 --- a/run +++ b/scripts/jar.sh @@ -1,15 +1,15 @@ -PROGRAM_NAME="PolygonFill" MAIN_CLASS="sig.PolygonFill" rm -Rf bin/* -javac -Xlint:unchecked -cp src -d bin src/sig/${PROGRAM_NAME}.java +javac -Xlint:unchecked -cp src -d bin ${PROJECT_DIR}/${PROJECT_NAME}.java printf "\n\n\nGenerating Manifest...\n\n" touch manifest echo "Main-Class: ${MAIN_CLASS}" >> manifest printf "\n\n\nCreating Jar...\n\n" -cd bin -jar cfm ${PROGRAM_NAME}.jar ../manifest sig +cd ${OUT_DIR} +jar cfm ${PROJECT_NAME}.jar ../manifest sig printf "\n\n\nRunning Program...\n\n" -java -jar ${PROGRAM_NAME}.jar +java -jar ${PROJECT_NAME}.jar +mv ${PROJECT_NAME}.jar .. cd .. -./clean \ No newline at end of file +./scripts/clean.sh \ No newline at end of file diff --git a/sig b/sig new file mode 100755 index 0000000..237f630 --- /dev/null +++ b/sig @@ -0,0 +1,18 @@ +export PROJECT_NAME="PolygonFill" +export PROJECT_DIR="src/sig" +export MAIN_CLASS="sig.${PROJECT_NAME}" +export OUT_DIR="bin" + + +if [ -z "$1" ] + then + echo "" + echo " Usage: ./sig {args}" + echo "" + echo " Command List:" + ls -1 ./scripts | sed -e 's/\.sh$//' | sed -e 's/^/ /' + echo "" + exit +fi + +./scripts/$1.sh "${*:2}" \ No newline at end of file