-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
54cdbf5
commit fe3d5d6
Showing
5 changed files
with
64 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
Ascii_Battleship.class | ||
.tmp/ | ||
build/ | ||
ascii-battleship/ |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
#!/bin/bash | ||
javac src/Ascii_Battleship.java | ||
jar cvmf manifest.txt Ascii_Battleship.jar Ascii_Battleship.class | ||
echo "Building Ascii Battleship" | ||
# create the .tmp directory | ||
mkdir -p .tmp | ||
# copy the source files to the tmp directory | ||
cp -r src/asciiBattleship/*.java .tmp | ||
# get all of the files | ||
cd .tmp | ||
find ./ -name "*.java" > sources.txt | ||
# compile the source files | ||
javac -encoding UTF-8 -cp ../lib/* -d ../build @sources.txt | ||
cd .. | ||
mkdir -p build | ||
unzip -q -o lib/*.jar -d build | ||
# add the jar dependencies to the classpath | ||
jar cmf manifest.txt Ascii_Battleship.jar -C build . | ||
# remove the .tmp directory | ||
rm -r .tmp | ||
rm -r build | ||
echo "Done!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Main-Class: Ascii_Battleship | ||
Main-Class: asciiBattleship.Ascii_Battleship |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters