Fix installer state and launcher freshness checks

This commit is contained in:
Gabriel Brown
2026-08-27 17:31:46 -04:00
parent 99156442b5
commit b5832fc94a
6 changed files with 156 additions and 19 deletions
+9 -3
View File
@@ -85,9 +85,15 @@ if [[ -d "$extensions_source" ]] && command -v npm >/dev/null 2>&1; then
# alone takes long enough to be worth not repeating on every re-run of
# a stage that is otherwise nearly instant.
built="$vicinae_data_dir/extensions/$name"
if [[ -d "$built" && "$extension/src" -ot "$built" ]]; then
printf 'Vicinae extension %s is already built\n' "$name"
continue
if [[ -d "$built" ]]; then
newer_source=''
if newer_source="$(find "$extension/src" -type f -newer "$built" -print -quit)" \
&& [[ -z "$newer_source" \
&& ! "$extension/package.json" -nt "$built" \
&& ! "$extension/package-lock.json" -nt "$built" ]]; then
printf 'Vicinae extension %s is already built\n' "$name"
continue
fi
fi
printf 'Building Vicinae extension %s\n' "$name"