Use the most optimal compression level of zip just in case

This commit is contained in:
Ryan L McIntyre 2020-01-18 21:18:14 -08:00
parent 2cb0488aaf
commit 0b66b58fa8

View file

@ -45,12 +45,12 @@ do
[[ -d "$outputdir" ]] || mkdir -p "$outputdir"
# -ic (ignore case not working)
zip "$outputdir/$basename" -rj "$searchdir" -i '*.[o,t]tf' -i '*.[O,T]TF'
zip -9 "$outputdir/$basename" -rj "$searchdir" -i '*.[o,t]tf' -i '*.[O,T]TF'
zipStatus=$?
if [ "$zipStatus" != "0" ]
then
echo "$LINE_PREFIX Could not create archive with the path junked (-j option) - likely same font names for different paths, zip status: $zipStatus"
echo "$LINE_PREFIX Retrying with full path"
zip "$outputdir/$basename" -r "$searchdir" -i '*.[o,t]tf' -i '*.[O,T]TF'
zip -9 "$outputdir/$basename" -r "$searchdir" -i '*.[o,t]tf' -i '*.[O,T]TF'
fi;
done