fix(makefile): correct minify-js receipe syntax

This commit is contained in:
yusing
2026-02-16 08:33:55 +08:00
parent ae45854977
commit b4a9f44f4e

View File

@@ -118,16 +118,17 @@ mod-tidy:
done done
minify-js: minify-js:
@if [ ${agent} = 1 ]; then \ @if [ "${agent}" = "1" ]; then \
echo "minify-js: skipped for agent"; \ echo "minify-js: skipped for agent"; \
elif [ ${socket-proxy} = 1 ]; then \ elif [ "${socket-proxy}" = "1" ]; then \
echo "minify-js: skipped for socket-proxy"; \ echo "minify-js: skipped for socket-proxy"; \
else \ else \
for file in $(find internal/ -name '*.js' | grep -v -- '-min\.js$'); do \ for file in $$(find internal/ -name '*.js' | grep -v -- '-min\.js$$'); do \
ext="${file##*.}"; \ ext="$${file##*.}"; \
base="${file%.*}"; \ base="$${file%.*}"; \
min_file="${base}-min.$ext"; \ min_file="$${base}-min.$$ext"; \
bunx --bun uglify-js $file --compress --mangle --output $min_file; \ echo "minifying $$file -> $$min_file"; \
bunx --bun uglify-js $$file --compress --mangle --output $$min_file; \
done \ done \
fi fi