#!/bin/bash # bash script replaces the mozilla keymappings file with mine. changes home/end behaviour. # get args: usage: mozkey [tb] case "$1" in "" ) app="Firefox.app";; "tb" ) app="Thunderbird.app";; * ) echo "Usage `basename $0` [tb]"; exit 7;; esac cd /tmp cp /Applications/$app/Contents/MacOS/chrome/toolkit.jar . jar xf toolkit.jar # here document replaces content/global/platformHTMLBindings.xml with the following: ( cat <<'END' END ) > content/global/platformHTMLBindings.xml jar cf toolkit.jar content/ mv toolkit.jar /Applications/$app/Contents/MacOS/chrome/ echo DONE