#!/bin/sh # EditAppInfo.sh # Mon Nov 17 14:41:56 PST 2008 # Chieh Cheng # http://www.CynosureX.com/ # GNU General Public License (GPL) Version 2, June 1991 textEditor="/Applications/TextEdit.app/Contents/MacOS/TextEdit" appDirs="/Applications /Applications/Utilities /Applications/Utilities/Java" scriptName=`basename "$0"` usage () { echo " Usage: ${scriptName} \"Application 1\" [ . . . \"Application N\" ]" } if [ -f "${textEditor}" ] then if [ $# -gt 0 ] then for application do for dir in ${appDirs} do infoFile="${dir}/${application}.app/Contents/Info.plist" if [ -f "${infoFile}" ] then break fi done if [ -f "${infoFile}" ] then sudo "${textEditor}" "${infoFile}" else echo "${application} does not exist in the following application directories:" echo "${appDirs}" fi done else usage fi else echo "TextEdit is not installed on this computer. ${scriptName} cannot continue." fi