#!/bin/bash # SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2020-present Fewtarius ### ### Simple script to build JELOS ### if [ !"${ARCH}" == true ] then echo "export ARCH before building." exit 1 fi export OS_VERSION=$(date +%Y%m%d) export BUILD_DATE=$(date) echo "Building ${DISTRO} for ${DEVICE}" if [ ! "${DIRTY}" = true ] then # If this variable exists in the environment, expand it and clean those packages too. PKG_CLEAN="${PKG_CLEAN} modules emulationstation retroarch lib32 jelos" # Clean a few packages to ensure the build date and version are updated for package in ${PKG_CLEAN} do ./scripts/clean ${package} done # Clean out old builds before starting the new one. rm -f ./release/${DISTRO}-${DEVICE}.${ARCH}-* # Remove the image root as it should be regenerated for every build. rm -rf ./build.${DISTRO}-${DEVICE}.${ARCH}/image fi if [ "${ARCH}" == "aarch64" ] then make image elif [ "${ARCH}" == "arm" ] then scripts/build_compat scripts/install arm32 fi if [ ! $? == 0 ] then echo "Build failed..exiting." exit 1 fi