nixos: gen 63 @ lilac — 2026-09-20 02:20 26.05.20260918.cf9d2fb (Yarara) -----

This commit is contained in:
2026-09-20 02:24:09 -06:00
parent 0ed1b19d50
commit da6e625f87
+10 -6
View File
@@ -91,16 +91,20 @@ in
cd "$ROOT" cd "$ROOT"
mkdir -p bin mkdir -p bin
SOURCES="$1" # Set the target directory, defaulting to the current directory (.) if $1 is empty
TARGET_DIR="$1"
find "$SOURCES" -name '*.java' -path '*.java' SOURCES_FILE="SOURCES"
if [ ! -s "$SOURCES" ]; then # Fix the find command to safely search the target directory
echo "jbuild: no .java files found under ./$SOURCES" >&2 find "$TARGET_DIR" -name '*.java' > "$SOURCES_FILE"
if [ ! -s "$SOURCES_FILE" ]; then
# Fix the error message to reference the directory, not the output text file
echo "jbuild: no .java files found under $TARGET_DIR" >&2
exit 1 exit 1
fi fi
javac -g --release 21 -encoding UTF-8 -d bin -cp "lib/*" @"$SOURCES" javac -g --release 21 -encoding UTF-8 -d bin -cp "lib/*" @"$SOURCES_FILE"
'') '')
(pkgs.writeShellScriptBin "jclean" '' (pkgs.writeShellScriptBin "jclean" ''