FuckyWucky/jasmin.sh

23 lines
426 B
Bash
Raw Permalink Normal View History

2019-05-04 21:52:52 +00:00
#! /bin/bash
wget https://downloads.sourceforge.net/project/jasmin/jasmin/jasmin-2.4/jasmin-2.4.zip
unzip jasmin-2.4.zip
java -jar ./jasmin-2.4/jasmin.jar build_hash.j
if [[ $? == 0 ]]; then
OUTPUT=$(java HelloWorld)
echo "#define HASH $OUTPUT" > hash.txt
rm jasmin-2.4.zip
rm -rf jasmin-2.4
rm HelloWorld.class
exit 0
else:
echo Hash not found
rm jasmin-2.4.zip
rm -rf jasmin-2.4
rm HelloWorld.class
exit 1
fi