forked from Hyperion/HyperionOS
24 lines
685 B
Bash
24 lines
685 B
Bash
#!/bin/sh
|
|
set -eu
|
|
OUT="${1:-nc-disk}"
|
|
if [ ! -d Build/'$' ] || [ ! -d Build/root ]; then
|
|
echo "error: Build/\$ and Build/root missing; run 'python build.py build --arch nc' first" >&2
|
|
exit 1
|
|
fi
|
|
rm -rf "$OUT"
|
|
mkdir -p "$OUT/hyperion" "$OUT/root"
|
|
cp -r Build/'$'/. "$OUT/hyperion"/
|
|
cp -r Build/root/. "$OUT/root"/
|
|
python3 "$(dirname "$0")/nc_mkdisk_meta.py" "$OUT/root"
|
|
cat > "$OUT/build.json" <<'EOF'
|
|
{
|
|
"entrypoint": "hyperion:nc/boot.lua",
|
|
"language": "Lua",
|
|
"partitions": [
|
|
{ "path": "hyperion", "readonly": false, "hidden": false },
|
|
{ "path": "root", "readonly": false, "hidden": false }
|
|
]
|
|
}
|
|
EOF
|
|
echo "wrote $OUT (boot=hyperion, system=root)"
|