sector-f-linux

Sector F Linux
git clone https://git.sectorflabs.com/sector-f-linux.git
Log | Files | Refs | README | LICENSE

build.sh (1301B)


      1 #!/usr/bin/env bash
      2 # Builds the Patina desktop (desktop/build.sh), the greeter, the updater, then the image, all on this machine:
      3 #   SYSTEM_IMAGE  the real image (the Containerfile's `system` stage), what `make publish` pushes and
      4 #                 so what `make iso` then carries
      5 #   IMAGE         the same plus a test login (`dev` stage), for the VM (`make disk`, `make run`)
      6 # Nothing is pushed; `make publish` is the only thing that does (linux/publish.sh).
      7 # QUICK=1 skips the desktop, greeter and updater builds, for changes to the image only (the Containerfile,
      8 # linux/system, branding): `make build QUICK=1`.
      9 source "$(dirname "$0")/common.sh"
     10 
     11 if [[ -z "${QUICK:-}" ]]; then
     12   "$ROOT/desktop/build.sh"
     13   "$ROOT/greeter-build.sh"
     14   "$ROOT/updater-build.sh"
     15 else
     16   echo "==> QUICK: not rebuilding the desktop, the greeter and the updater (build/ as it is)"
     17 fi
     18 build_id=$(date -u +%Y-%m-%dT%H:%M:%SZ)
     19 say "building $SYSTEM_IMAGE ($build_id)"
     20 docker build -f "$ROOT/Containerfile" --target system -t "$SYSTEM_IMAGE" "$ROOT"
     21 say "building $IMAGE (the same, with a test login)"
     22 docker build -f "$ROOT/Containerfile" --target dev \
     23   --build-arg BUILD_ID="$build_id" -t "$IMAGE" "$ROOT"
     24 say "done: $SYSTEM_IMAGE and $IMAGE, on this machine only. make run to try it, make publish, then make iso."