Prevent building for Apple platforms if no `.icns` file is present.

master
Brainwrecked Tech 5 years ago
parent e3e6e80f50
commit 4182029117

@ -42,8 +42,6 @@ for PLAT in "${TRGT[@]}"; do
URL="$(< "${EUF}")" URL="$(< "${EUF}")"
mkdir -pv "${FQP}/${APP}"
EXE=(nativefier --platform "${PLAT}" --arch ${ARCH} --honest --disable-context-menu --disable-dev-tools --name "${APP}") EXE=(nativefier --platform "${PLAT}" --arch ${ARCH} --honest --disable-context-menu --disable-dev-tools --name "${APP}")
case "${PLAT}" in case "${PLAT}" in
@ -59,6 +57,9 @@ for PLAT in "${TRGT[@]}"; do
;; ;;
esac 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" EIF="${FQP}/injects/${APP}.css"
[ -L "${EIF}" ] && EIF="$(readlink -f "${EIF}")" [ -L "${EIF}" ] && EIF="$(readlink -f "${EIF}")"
[ -f "${EIF}" ] && EXE+=(--inject "${EIF}") [ -f "${EIF}" ] && EXE+=(--inject "${EIF}")
@ -69,6 +70,7 @@ for PLAT in "${TRGT[@]}"; do
EXE+=("${URL}") EXE+=("${URL}")
mkdir -pv "${FQP}/${APP}"
cd "${FQP}/${APP}" cd "${FQP}/${APP}"
echo "${EXE[@]}" echo "${EXE[@]}"
${EXE[@]} ${EXE[@]}

Loading…
Cancel
Save