#!/usr/bin/env bash set -e # Crash when a command fails whoami source /buildmeta/buildconfig.sh echo "* Build Step: Arch Linux Base Root *" mkdir -p rootfs/ rm -rf rootfs/* echo " * Starting Build! 🚀" echo $PROLINUX_ARCH if [[ "$PROLINUX_ARCH" == "aarch64" ]]; then echo " * Building Arch Linux for aarch64..." ./arch-bootstrap.sh -a aarch64 rootfs/ echo " * Copying and compressing the tar..." cd rootfs/ tar -czvf ../sineware-buildroot.tar.gz . cd .. mv -v sineware-buildroot.tar.gz /artifacts/aarch64/sineware-buildroot.tar.gz elif [[ "$PROLINUX_ARCH" == "x86_64" ]]; then echo " * Building Arch for x86_64..." ./arch-bootstrap.sh -a x86_64 rootfs/ echo " * Copying and compressing the tar..." cd rootfs/ tar -czvf ../sineware-buildroot.tar.gz . cd .. mv -v sineware-buildroot.tar.gz /artifacts/sineware-buildroot.tar.gz else echo ' *ERROR: Unknown architecture set in PROLINUX_ARCH.' exit -1 fi