🐛 fix(build): read region profiles from settings package

- 🐛 default/ ships in omarchy-settings, so published builds silently bundled no regions
- ✅ cover the published package path, a package without profiles, and an unreadable one

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g
This commit is contained in:
Kros DaiandClaude Opus 5.5 committed 2026-10-08 15:32:46 -04:00
1 parent 9dcfdb035a
commit 27b7e76c5a
3 files changed
+101 -10

No files matched your search

+16 -3
View File
@@ -6,12 +6,25 @@
# defaults stay in the runtime, not in a second set of ISO-specific templates.
set -euo pipefail
regions="$1"
regions_source="$1"
iso_payload="$2"
online_config="$3"
# A runtime predating region profiles ships none; the ISO then installs
# global targets only, exactly as before.
# The source is a checkout's default/regions, or the published settings
# package that ships default/. One predating region profiles ships none; the
# ISO then installs global targets only, exactly as before. Anything else that
# fails here, such as an unreadable package, aborts the build.
regions="$regions_source"
if [[ -f $regions_source ]]; then
member=usr/share/omarchy/default/regions
listing=$(bsdtar -tf "$regions_source")
if grep -q "^$member/" <<<"$listing"; then
extracted=$(mktemp -d)
trap 'rm -rf "$extracted"' EXIT
bsdtar -xf "$regions_source" -C "$extracted" "$member"
regions="$extracted/$member"
fi
fi
if [[ ! -d $regions ]]; then
echo "Runtime ships no region profiles; every install will be global."
exit 0