mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-09-19 09:51:48 +02:00
Fixes issue with same file name after paths are junked with '-j' option (e.g. Gohu) (issue #418)
This commit is contained in:
parent
e1ac5706c5
commit
2cb0488aaf
1 changed files with 11 additions and 5 deletions
|
@ -39,12 +39,18 @@ find -- * -maxdepth 0 -iregex "$pattern" -type d |
|
|||
while read -r filename
|
||||
do
|
||||
|
||||
basename=$(basename "$filename")
|
||||
searchdir=$filename
|
||||
basename=$(basename "$filename")
|
||||
searchdir=$filename
|
||||
|
||||
[[ -d "$outputdir" ]] || mkdir -p "$outputdir"
|
||||
[[ -d "$outputdir" ]] || mkdir -p "$outputdir"
|
||||
|
||||
# -ic (ignore case not working)
|
||||
zip "$outputdir/$basename" -rj "$searchdir" -i '*.[o,t]tf' -i '*.[O,T]TF'
|
||||
|
||||
zip "$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'
|
||||
fi;
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue