#! /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