nixos: gen 63 @ lilac — 2026-09-20 02:20 26.05.20260918.cf9d2fb (Yarara) -----
This commit is contained in:
+10
-6
@@ -91,16 +91,20 @@ in
|
||||
cd "$ROOT"
|
||||
mkdir -p bin
|
||||
|
||||
SOURCES="$1"
|
||||
|
||||
find "$SOURCES" -name '*.java' -path '*.java'
|
||||
# Set the target directory, defaulting to the current directory (.) if $1 is empty
|
||||
TARGET_DIR="$1"
|
||||
SOURCES_FILE="SOURCES"
|
||||
|
||||
if [ ! -s "$SOURCES" ]; then
|
||||
echo "jbuild: no .java files found under ./$SOURCES" >&2
|
||||
# Fix the find command to safely search the target directory
|
||||
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
|
||||
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" ''
|
||||
|
||||
Reference in New Issue
Block a user