From 7e47f878e116eca14f5e11a9d97edf6437c7eafb Mon Sep 17 00:00:00 2001 From: Oliver Akins Date: Thu, 8 Dec 2022 12:29:22 -0600 Subject: [PATCH] Add a script to make running the Java solutions cleaner --- run | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 run diff --git a/run b/run new file mode 100755 index 0000000..bbfe680 --- /dev/null +++ b/run @@ -0,0 +1,15 @@ +#!/bin/bash + +JAVA_BIN="/home/oliver/.jdks/jdk-17.0.1/bin" + +if [[ $# -lt 2 ]]; then + echo "Not enough arguments: $0 [argpass]"; + exit 1; +fi; + +day=$1; +if [[ $1 -lt 10 ]]; then + day="0$1" +fi; + +$JAVA_BIN/java --class-path jlib/*:. day_$day/java/Part$2.java "${@:3}" \ No newline at end of file