From b4c057170d8c6db4b04521a6ad7f00c977a12781 Mon Sep 17 00:00:00 2001 From: Gorian <1012176+Gorian@users.noreply.github.com> Date: Sat, 14 Oct 2023 12:14:00 -0700 Subject: [PATCH] Update flatpak_build_bundle.sh Bash should always use double brackets, not single. Also, moved to using a variable rather than the same command multiple times - this pattern helps to reduce errors in the future --- automation_tools/flatpak_build_bundle.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/automation_tools/flatpak_build_bundle.sh b/automation_tools/flatpak_build_bundle.sh index cef69eff..0ad6ea4f 100755 --- a/automation_tools/flatpak_build_bundle.sh +++ b/automation_tools/flatpak_build_bundle.sh @@ -2,8 +2,10 @@ # This is building the bundle RetroDECK.flatpak after the download and build steps are done -if [ "${GITHUB_REF##*/}" = "main" ]; then - flatpak build-bundle ${GITHUB_WORKSPACE}/local RetroDECK.flatpak net.retrodeck.retrodeck +if [[ "${GITHUB_REF##*/}" == "main" ]]; then + flatpak = "RetroDECK.flatpak" else - flatpak build-bundle ${GITHUB_WORKSPACE}/local RetroDECK-cooker.flatpak net.retrodeck.retrodeck -fi \ No newline at end of file + flatpak = "RetroDECK-cooker.flatpak" +fi + +flatpak build-bundle "${GITHUB_WORKSPACE}/local" "${flatpak}" net.retrodeck.retrodeck