#!/bin/bash #cd /usr/local/lib #ln -s libgdraw.1.*.*.dylib libgdraw.1.dylib #ln -s libgdraw.*.*.*.dylib libgdraw.dylib #ln -s libgunicode.1.*.*.dylib libgunicode.1.dylib #ln -s libgunicode.*.*.*.dylib libgunicode.dylib #Mac OS/X 10.1 did not have plutil if test -d ~/Library/Preferences -a -e /usr/bin/plutil ; then if test \! -e ~/Library/Preferences/com.apple.x11.plist ; then cat <~/Library/Preferences/com.apple.x11.plist apps_menu Terminal xterm n FontForge /usr/local/bin/fontforge f EOF plutil -convert binary1 ~/Library/Preferences/com.apple.x11.plist elif grep -q fontforge ~/Library/Preferences/com.apple.x11.plist ; then cat /dev/null # It's already in the menu, no need to add it else if grep -q "xml version=" ~/Library/Preferences/com.apple.x11.plist ; then # It's already in xml format cp ~/Library/Preferences/com.apple.x11.plist /tmp/x11.xml else plutil -convert xml1 -o /tmp/x11.xml ~/Library/Preferences/com.apple.x11.plist fi if grep -q apps_menu ~/Library/Preferences/com.apple.x11.plist ; then cat >/tmp/fontforge-sed-script <\\ FontForge\\ /usr/local/bin/fontforge\\ f\\ } EOF else cat >/tmp/fontforge-sed-script <apps_menu\\ \\ \\ Terminal\\ xterm\\ n\\ \\ \\ FontForge\\ /usr/local/bin/fontforge\\ f\\ \\ EOF fi sed -f /tmp/fontforge-sed-script /tmp/x11.xml >/tmp/x11_1.xml plutil -convert binary1 -o ~/Library/Preferences/com.apple.x11.plist /tmp/x11_1.xml rm -f /tmp/x11_1.xml /tmp/fontforge-sed-script /tmp/x11.xml fi fi exit 0