2023-11-30 15:15:31 +00:00
#!/bin/bash
2024-03-08 19:36:39 +00:00
# WARNING: run this script from the project root folder, not from here!!
2024-03-08 19:31:38 +00:00
2024-07-12 23:47:29 +00:00
# Check if script is running with elevated privileges
if [ " $EUID " -ne 0 ] ; then
2024-12-12 13:11:04 +00:00
read -rp "The build might fail without some superuser permissions, please run me with sudo. Continue WITHOUT sudo (not suggested)? [y/N] " continue_without_sudo
2024-07-12 23:47:29 +00:00
if [ [ " $continue_without_sudo " != "y" ] ] ; then
exit 1
fi
fi
2024-03-06 07:24:34 +00:00
git submodule update --init --recursive
2023-11-30 15:15:31 +00:00
export GITHUB_WORKSPACE = "."
2024-07-12 08:02:56 +00:00
# Initialize the Flatpak repo
ostree init --mode= archive-z2 --repo= ${ GITHUB_WORKSPACE } /retrodeck-repo
2024-12-11 05:53:38 +00:00
# Backing up original manifest
2023-11-30 16:04:21 +00:00
cp net.retrodeck.retrodeck.appdata.xml net.retrodeck.retrodeck.appdata.xml.bak
cp net.retrodeck.retrodeck.yml net.retrodeck.retrodeck.yml.bak
2023-11-30 15:15:31 +00:00
2024-12-11 05:53:38 +00:00
if [ [ -f "net.retrodeck.retrodeck.cached.yml" ] ] ; then
read -rp "A cached manifest file with placeholder substitutions already exists. Do you want to use it? [y/N] " use_cached
if [ [ " ${ use_cached ,, } " = = "y" ] ] ; then
2024-12-21 01:31:30 +00:00
mv -f net.retrodeck.retrodeck.cached.yml net.retrodeck.retrodeck.yml
2024-12-11 05:53:38 +00:00
else
use_cached = "n"
fi
else
use_cached = "n"
fi
export use_cached
2023-11-30 15:15:31 +00:00
automation_tools/install_dependencies.sh
automation_tools/cooker_build_id.sh
automation_tools/pre_build_automation.sh
automation_tools/cooker_flatpak_portal_add.sh
2024-07-12 08:26:45 +00:00
# THIS SCRIPT IS BROKEN HENCE DISABLED FTM
# automation_tools/appdata_management.sh
2023-11-30 15:15:31 +00:00
automation_tools/flatpak_build_download_only.sh
2024-12-11 05:53:38 +00:00
automation_tools/flatpak_build_only.sh " ${ @ } "
2023-11-30 15:15:31 +00:00
automation_tools/flatpak_build_bundle.sh
2024-12-21 01:31:30 +00:00
mv -f net.retrodeck.retrodeck.appdata.xml.bak net.retrodeck.retrodeck.appdata.xml
mv -f net.retrodeck.retrodeck.yml.bak net.retrodeck.retrodeck.yml