Skip to content

Commit

Permalink
Updated build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
hashsploit committed May 11, 2020
1 parent c83ad49 commit b6b883c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ protocol [here](https://wiki.hashsploit.net/Ratchet_and_Clank_3:Protocol).
You can execute the `build.sh` or `build.bat` script to build the jar. Then
you can execute the `launch.sh` or `launch.bat` script to run the jar located in `target/`.

Example:
```bash
./launch.sh <mode> -k [key] -m <message>
```

### CLI usage:

```bash
Expand Down
4 changes: 4 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
@echo off

REM Remove old builds and rebuild
RM target/*.jar
mvn package
mvn assembly:assembly
4 changes: 4 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
#!/bin/bash

# Remove old build and rebuild
rm target/*.jar
mvn package
mvn assembly:assembly
7 changes: 6 additions & 1 deletion launch.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
@echo off

REM TODO: check if jar doesn't exist prompt user to run
REM build.bat first

java -jar target/uya-medius-tool-*-jar-with-dependencies.jar $@
pause

PAUSE
5 changes: 5 additions & 0 deletions launch.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#!/bin/bash

if [ ! -f target/uya-medius-tool-*-jar-with-dependencies.jar ]; then
echo -e "$(tput bold)$(tput setaf 1)Error: run ./build.sh first!$(tput sgr0)"
exit 1
fi

java -jar target/uya-medius-tool-*-jar-with-dependencies.jar $@

0 comments on commit b6b883c

Please sign in to comment.