Better exit status preservation on error.
This commit is contained in:
parent
02aed778bc
commit
7a97a0b0c8
@ -98,13 +98,10 @@ if [[ "$(latest "$ios_icon"/*)" -nt "$appiconset/Contents.json" ]] ||
|
|||||||
source=$ios_icon/$filename
|
source=$ios_icon/$filename
|
||||||
if [[ ! -e $source ]]; then
|
if [[ ! -e $source ]]; then
|
||||||
source=$mac_icon/$filename
|
source=$mac_icon/$filename
|
||||||
if [[ ! -e $source ]]; then
|
[[ -e $source ]] || ftl 'No icon for: %s' "$filename"
|
||||||
err 'No icon for: %s' "$filename"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if imageProps=$(copyImage "$source" "$appiconset/$filename"); then
|
imageProps=$(copyImage "$source" "$appiconset/$filename")
|
||||||
printf '%s{"size":"%dx%d","filename":"%s","scale":"%sx"' \
|
printf '%s{"size":"%dx%d","filename":"%s","scale":"%sx"' \
|
||||||
"$comma" "$pt" "$pt" "$filename" "$scale"
|
"$comma" "$pt" "$pt" "$filename" "$scale"
|
||||||
[[ $idiom ]] && printf ',"idiom":"%s"' "$idiom"
|
[[ $idiom ]] && printf ',"idiom":"%s"' "$idiom"
|
||||||
@ -113,11 +110,6 @@ if [[ "$(latest "$ios_icon"/*)" -nt "$appiconset/Contents.json" ]] ||
|
|||||||
printf '}'
|
printf '}'
|
||||||
|
|
||||||
comma=,
|
comma=,
|
||||||
else
|
|
||||||
rm "$appiconset/Contents.json"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
done
|
||||||
printf '],"info":{"version":1,"author":"genassets"},"properties":{"pre-rendered":true}}\n'
|
printf '],"info":{"version":1,"author":"genassets"},"properties":{"pre-rendered":true}}\n'
|
||||||
} > "$appiconset/Contents.json"
|
} > "$appiconset/Contents.json"
|
||||||
@ -138,7 +130,7 @@ if [[ "$(latest "$ios_launch"/*)" -nt "$launchimage/Contents.json" ]]; then
|
|||||||
esac
|
esac
|
||||||
filename="Default${os:+-$os}${subtype:+-$subtype}${scale:+@${scale}x}${idiom:+~$idiom}.png"
|
filename="Default${os:+-$os}${subtype:+-$subtype}${scale:+@${scale}x}${idiom:+~$idiom}.png"
|
||||||
|
|
||||||
if imageProps=$(copyImage "$ios_launch/$name${scale:+@${scale}x}.png" "$launchimage/$filename"); then
|
imageProps=$(copyImage "$ios_launch/$name${scale:+@${scale}x}.png" "$launchimage/$filename"); then
|
||||||
printf '%s{"extent":"full-screen","filename":"%s","orientation":"portrait","scale":"%sx"' \
|
printf '%s{"extent":"full-screen","filename":"%s","orientation":"portrait","scale":"%sx"' \
|
||||||
"$comma" "$filename" "${scale:-1}"
|
"$comma" "$filename" "${scale:-1}"
|
||||||
[[ $idiom ]] && printf ',"idiom":"%s"' "$idiom"
|
[[ $idiom ]] && printf ',"idiom":"%s"' "$idiom"
|
||||||
@ -148,10 +140,6 @@ if [[ "$(latest "$ios_launch"/*)" -nt "$launchimage/Contents.json" ]]; then
|
|||||||
printf '}'
|
printf '}'
|
||||||
|
|
||||||
comma=,
|
comma=,
|
||||||
else
|
|
||||||
rm "$launchimage/Contents.json"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
printf '],"info":{"version":1,"author":"genassets"}}\n'
|
printf '],"info":{"version":1,"author":"genassets"}}\n'
|
||||||
} > "$launchimage/Contents.json"
|
} > "$launchimage/Contents.json"
|
||||||
|
Loading…
Reference in New Issue
Block a user