mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
Fix compile_graphics.sh flattening subfolder SVGs (wrong Payjoin/info icons) (#3685)
* Fix compile_graphics.sh flattening subfolder SVGs into parent dirs vector_graphics_compiler's --input-dir lists recursively and writes each file to out-dir/<basename>.vec, so the run for res/pictures also compiled every subfolder SVG into assets/new-ui and same-named files (payjoin.svg, info.svg, lightning.svg) overwrote the root ones nondeterministically. Compile only each directory's own SVGs via a temp copy. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01StzwoeTrDpPZxw5ERPaynT * Remove explanatory comment per review Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YB4vJJnUcdupSKFD9nYpK7 --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
5f91c4d262
commit
5f04688d82
+6
-1
@@ -9,12 +9,17 @@
|
||||
src="res/pictures"
|
||||
dst="assets/new-ui"
|
||||
|
||||
tmp="$(mktemp -d)"
|
||||
trap 'rm -rf "$tmp"' EXIT
|
||||
|
||||
while read -r dir; do
|
||||
rel="${dir#"$src"}"
|
||||
outdir="$dst$rel"
|
||||
indir="$(mktemp -d "$tmp/XXXXXX")"
|
||||
|
||||
mkdir -p "$outdir"
|
||||
dart run vector_graphics_compiler --input-dir "$dir" --out-dir "$outdir" >/dev/null &
|
||||
find "$dir" -maxdepth 1 -type f -name '*.svg' -exec cp {} "$indir" ';'
|
||||
dart run vector_graphics_compiler --input-dir "$indir" --out-dir "$outdir" >/dev/null &
|
||||
done < <(find "$src" -type d)
|
||||
|
||||
wait
|
||||
Reference in New Issue
Block a user