From be8fefcb9c03288c1f82b1df68c14e1171026999 Mon Sep 17 00:00:00 2001 From: joshashtondev Date: Thu, 8 Oct 2026 13:52:51 -0600 Subject: [PATCH] =?UTF-8?q?nixos:=20gen=2082=20@=20lilac=20=E2=80=94=20202?= =?UTF-8?q?6-10-08=2013:52=2026.05.20260918.cf9d2fb=20(Yarara)=20-----?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home/jashton.nix | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/home/jashton.nix b/home/jashton.nix index cc1c228..a73f59b 100644 --- a/home/jashton.nix +++ b/home/jashton.nix @@ -84,22 +84,15 @@ in '') (pkgs.writeShellScriptBin "jbuild" '' - set -euo pipefail - if [ $# -lt 1 ]; then - echo "usage: jbuild [args...]" >&2 - exit 1 - fi - ROOT="$(jroot)" cd "$ROOT" mkdir -p bin # Set the target directory, defaulting to the current directory (.) if $1 is empty - TARGET_DIR="$1" SOURCES_FILE="SOURCES" # Fix the find command to safely search the target directory - find "$TARGET_DIR" -name '*.java' > "$SOURCES_FILE" + find . -name '*.java' > "$SOURCES_FILE" if [ ! -s "$SOURCES_FILE" ]; then # Fix the error message to reference the directory, not the output text file @@ -119,30 +112,23 @@ in (pkgs.writeShellScriptBin "jclean" '' set -euo pipefail ROOT="$(jroot)" - rm -rf "$ROOT/bin" + rm -rf "$ROOT/bin/*" echo "cleaned $ROOT/bin" '') (pkgs.writeShellScriptBin "jrun" '' - set -euo pipefail if [ $# -lt 3 ]; then - echo "usage: jrun [args...]" >&2 + echo "usage: jrun [args...]" >&2 exit 1 fi ROOT="$(jroot)" cd "$ROOT" - jbuild "$1" MAIN="$2.$3" - shift 3 + shift 2 java -cp "bin:lib/*" "$MAIN" "$@" '') (pkgs.writeShellScriptBin "jtest" '' - if [ "$#" -neq 1 ]; then - echo "usage: jtest " - exit 1 - fi - # sort -V so 1.10.2 beats 1.9.0; plain tail -n1 sorts those the wrong way. JUNIT="$(ls -1 "$HOME"/dev/jars/junit-platform-console-standalone-*.jar 2>/dev/null | sort -V | tail -n1 || true)" if [ -z "$JUNIT" ]; then