sector-f-linux

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

installer-build.sh (1138B)


      1 #!/usr/bin/env bash
      2 # Builds the Patina installer (../installer) for the image, in the same Fedora 45 builder as the
      3 # desktop (desktop/build.sh), so it links the libraries the image has. It lands in
      4 # build/installer/ as it goes under /, and the Containerfile copies it in. The whole repository is
      5 # mounted because the installer embeds the logo from linux/system/.
      6 set -euo pipefail
      7 
      8 ROOT=$(cd "$(dirname "$0")/.." && pwd)   # the repository
      9 BUILDER=patina-os-desktop-builder
     10 STAGE="$ROOT/linux/build/installer"
     11 
     12 docker build -q -f "$ROOT/linux/desktop/builder.Containerfile" -t "$BUILDER" "$ROOT/linux/desktop" >/dev/null
     13 printf '==> building patina-installer\n'
     14 docker run --rm --user "$(id -u):$(id -g)" -e CARGO_HOME=/cargo -e HOME=/tmp \
     15   -v patina-os-cargo:/cargo -v "$ROOT:/repo" -w /repo/installer "$BUILDER" \
     16   cargo build --release --locked --target-dir /repo/installer/target-fedora
     17 
     18 rm -rf "$STAGE" && mkdir -p "$STAGE/usr/libexec"
     19 install -m 755 "$ROOT/installer/target-fedora/release/patina-installer" "$STAGE/usr/libexec/patina-installer"
     20 printf '==> build/installer/ (%s)\n' "$(git -C "$ROOT" rev-parse --short HEAD)"