fixed linux/macos run script. added additional cli options to create jar, and redirected compiled classes to new bin directory
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2
-5
@@ -2,11 +2,8 @@ function Run {
|
||||
param(
|
||||
[string]$flag
|
||||
)
|
||||
javac *.java
|
||||
java App $flag
|
||||
Remove-Item *.class
|
||||
Remove-Item gui/*.class
|
||||
Remove-Item gui/backend/*.class
|
||||
javac -d bin *.java
|
||||
java -cp bin App $flag
|
||||
}
|
||||
|
||||
if ($args.Length -eq 1) {
|
||||
|
||||
Regular → Executable
+30
-11
@@ -1,13 +1,32 @@
|
||||
run() {
|
||||
javac *.java
|
||||
java App $1
|
||||
rm *.class
|
||||
rm gui/*.class
|
||||
rm gui/backend/*.class
|
||||
function run() {
|
||||
if [[ $# -eq 0 ]]; then
|
||||
# Compile the program
|
||||
javac -d bin *.java
|
||||
java -cp bin App
|
||||
else
|
||||
case $1 in
|
||||
"-c" | "--cli")
|
||||
# Run the program in the CLI
|
||||
# Compile the program
|
||||
javac -d bin *.java
|
||||
java -cp bin App -c
|
||||
;;
|
||||
|
||||
"-b" | "--build")
|
||||
# Compile the program
|
||||
javac -d bin *.java
|
||||
;;
|
||||
|
||||
"-j" | "--jar")
|
||||
# Create a JAR file
|
||||
jar cfe sudoku.jar App -C bin .
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Invalid argument"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
if($# -eq 1) then
|
||||
FLAG=$1
|
||||
fi
|
||||
|
||||
run $FLAG
|
||||
run $@
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user