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
|
||||
if [[ ! -e $source ]]; then
|
||||
source=$mac_icon/$filename
|
||||
if [[ ! -e $source ]]; then
|
||||
err 'No icon for: %s' "$filename"
|
||||
exit 1
|
||||
fi
|
||||
[[ -e $source ]] || ftl 'No icon for: %s' "$filename"
|
||||
fi
|
||||
|
||||
if imageProps=$(copyImage "$source" "$appiconset/$filename"); then
|
||||
imageProps=$(copyImage "$source" "$appiconset/$filename")
|
||||
printf '%s{"size":"%dx%d","filename":"%s","scale":"%sx"' \
|
||||
"$comma" "$pt" "$pt" "$filename" "$scale"
|
||||
[[ $idiom ]] && printf ',"idiom":"%s"' "$idiom"
|
||||
@ -113,11 +110,6 @@ if [[ "$(latest "$ios_icon"/*)" -nt "$appiconset/Contents.json" ]] ||
|
||||
printf '}'
|
||||
|
||||
comma=,
|
||||
else
|
||||
rm "$appiconset/Contents.json"
|
||||
exit
|
||||
fi
|
||||
|
||||
done
|
||||
printf '],"info":{"version":1,"author":"genassets"},"properties":{"pre-rendered":true}}\n'
|
||||
} > "$appiconset/Contents.json"
|
||||
@ -138,7 +130,7 @@ if [[ "$(latest "$ios_launch"/*)" -nt "$launchimage/Contents.json" ]]; then
|
||||
esac
|
||||
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"' \
|
||||
"$comma" "$filename" "${scale:-1}"
|
||||
[[ $idiom ]] && printf ',"idiom":"%s"' "$idiom"
|
||||
@ -148,10 +140,6 @@ if [[ "$(latest "$ios_launch"/*)" -nt "$launchimage/Contents.json" ]]; then
|
||||
printf '}'
|
||||
|
||||
comma=,
|
||||
else
|
||||
rm "$launchimage/Contents.json"
|
||||
exit
|
||||
fi
|
||||
done
|
||||
printf '],"info":{"version":1,"author":"genassets"}}\n'
|
||||
} > "$launchimage/Contents.json"
|
||||
|
Loading…
Reference in New Issue
Block a user