Skip to content

Instantly share code, notes, and snippets.

@ahknight
Created February 19, 2014 17:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahknight/9097032 to your computer and use it in GitHub Desktop.
Save ahknight/9097032 to your computer and use it in GitHub Desktop.
Adds all given files to the given plist as properties of UIAppFonts (iOS).
#!/bin/bash
if [ -z $1 ]; then
echo "usage: `basename $0` /full/path/to/MYPROJ-Info.plist font1.(ttf|otf) [font2 font3 ...] #names of font files"
exit 1
fi
PLIST=$1
shift
FONTS=$@
for FONT in $FONTS; do
defaults write "${PLIST//.plist/}" UIAppFonts -array-add "${FONT}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment