Merge branch 'font-prep'

* font-prep:
  Fonts prepped 🎉
  Don't track the .setup_complete files.
  Fix double quotes
  Cleanup
  setup scripts
  account for TTC files.
  Iterate over each folder.
  using the script to move things around.

# Conflicts:
#	prep 1 font.sh
This commit is contained in:
Matt Troutman 2024-09-27 12:42:01 -05:00
commit eb865b1dc3
No known key found for this signature in database
531 changed files with 91 additions and 1317 deletions

View file

@ -1,10 +1,9 @@
#! /bin/zsh
#if current working directory is named font_files or custom_fonts, exit
if [[ $PWD == *"font_files" ]] || [[ $PWD == *"custom_fonts" ]]; then
echo "You are in the wrong directory. Please move to the individual font folder."
exit
fi
#uncomment if you want to delete all .setup_complete files and process everything
#find . -name '*.setup_complete' -type f -delete
#if file name .setup_complete exists, exit
if [ -f .setup_complete ]; then
@ -12,6 +11,13 @@ if [ -f .setup_complete ]; then
exit
fi
#if current working directory is named font_files or custom_fonts, exit
if [[ $PWD == *"font_files" ]] || [[ $PWD == *"custom_fonts" ]]; then
echo "You are in the wrong directory. Please move to the individual font folder."
exit
fi
#recursively find all .zip files and unzip them
find . -name '*.zip' -exec unzip {} \;
@ -31,9 +37,12 @@ find . -name '*.zip' -type f -delete
# Recurse through all folders and subfolders and move all .ttf files into the TTF folder
find . -name '*.ttf' -type f -exec mv {} TTF \;
# Recurse through all folders and subfolders and move all .ttc files into the TTF folder
find . -name '*.ttc' -type f -exec mv {} TTF \;
# Recurse through all folders and subfolders and move all .otf files into the OTF folder
find . -name '*.otf' -type f -exec mv {} OTF \;
# Recurse through all folders and subfolders and delete all empty folders
find . -type d -empty -delete
# create a .setup_complete file to indicate that the folder has been prepped
touch .setup_complete