From 4182029117e7c85c4570396a0a116ff9469e2a03 Mon Sep 17 00:00:00 2001 From: bwt Date: Sat, 1 Feb 2020 07:55:13 -0500 Subject: [PATCH] Prevent building for Apple platforms if no `.icns` file is present. --- build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 0363578..950f83b 100755 --- a/build.sh +++ b/build.sh @@ -42,8 +42,6 @@ for PLAT in "${TRGT[@]}"; do URL="$(< "${EUF}")" - mkdir -pv "${FQP}/${APP}" - EXE=(nativefier --platform "${PLAT}" --arch ${ARCH} --honest --disable-context-menu --disable-dev-tools --name "${APP}") case "${PLAT}" in @@ -59,6 +57,9 @@ for PLAT in "${TRGT[@]}"; do ;; esac + [ "${PLAT}" = "darwin" -o "${PLAT}" = "mas" ] && [ ! -f "${EIF}" ] && \ + echo " -> $(tput bold)$(tput setaf 5)Apple platforms require an .icns file$(tput sgr0)" && continue + EIF="${FQP}/injects/${APP}.css" [ -L "${EIF}" ] && EIF="$(readlink -f "${EIF}")" [ -f "${EIF}" ] && EXE+=(--inject "${EIF}") @@ -69,6 +70,7 @@ for PLAT in "${TRGT[@]}"; do EXE+=("${URL}") + mkdir -pv "${FQP}/${APP}" cd "${FQP}/${APP}" echo "${EXE[@]}" ${EXE[@]}