From e3e7bf5ccdb9b523256f2f44fb208e62055f505a Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Mon, 11 Jan 2021 02:34:41 +0300 Subject: [PATCH] Package script: tar jar and run.sh --- package.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 package.sh diff --git a/package.sh b/package.sh new file mode 100755 index 0000000..1ba7c9a --- /dev/null +++ b/package.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +GIT=$(command -v git) +HEAD=$(command -v head) +CUT=$(command -v cut) + +JAR_ARTIFACT="out/artifacts/Hajj_simulation_jar/Hajj-simulation.jar" + +if [ -z $"GIT" ] || [ -z $"HEAD" ] || [ -z $"CUT" ]; then + echo "Tools missing" + exit 1 +else + tar -cvf Hajj-Simulation-$(git log | head -n1 | cut -d' ' -f2).tar.gz $JAR_ARTIFACT run.sh +fi