Index: trunk/package/Scripts/Keymaps/postinstall =================================================================== --- trunk/package/Scripts/Keymaps/postinstall (revision 1569) +++ trunk/package/Scripts/Keymaps/postinstall (revision 1570) @@ -1,34 +0,0 @@ -#!/usr/bin/python -# Script to add KeyLayout for Chameleon boot loaders - -import sys -import os -import shutil - -vol = str(sys.argv[3]) -boot = "/Extra/org.chameleon.Boot.plist" -plist = vol + boot -if not os.path.exists(plist): - shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist) - -infile = open(plist, "r") -# check if Graphics_Mode has been written or not -KeyLayoutCheck = False - -body = "" - -for line in infile: - # if we finish the tags and haven't written KeyLayout Yet - if "" in line and KeyLayoutCheck == False: - line = " KeyLayout\n" - line += " @@KEYMAP@@\n" - line += "\n" - KeyLayoutCheck = True - - body += line - -infile.close() - -outfile = open(plist, "w") -outfile.write(body) -outfile.close() Index: trunk/package/Scripts/Keymaps/postinstall.in =================================================================== --- trunk/package/Scripts/Keymaps/postinstall.in (revision 0) +++ trunk/package/Scripts/Keymaps/postinstall.in (revision 1570) @@ -0,0 +1,34 @@ +#!/usr/bin/python +# Script to add KeyLayout for Chameleon boot loaders + +import sys +import os +import shutil + +vol = str(sys.argv[3]) +boot = "/Extra/org.chameleon.Boot.plist" +plist = vol + boot +if not os.path.exists(plist): + shutil.copy('/Library/Preferences/SystemConfiguration/com.apple.Boot.plist', plist) + +infile = open(plist, "r") +# check if Graphics_Mode has been written or not +KeyLayoutCheck = False + +body = "" + +for line in infile: + # if we finish the tags and haven't written KeyLayout Yet + if "" in line and KeyLayoutCheck == False: + line = " KeyLayout\n" + line += " @@KEYMAP@@\n" + line += "\n" + KeyLayoutCheck = True + + body += line + +infile.close() + +outfile = open(plist, "w") +outfile.write(body) +outfile.close() Property changes on: trunk/package/Scripts/Keymaps/postinstall.in ___________________________________________________________________ Added: svn:executable + * Index: trunk/package/buildpkg.sh =================================================================== --- trunk/package/buildpkg.sh (revision 1569) +++ trunk/package/buildpkg.sh (revision 1570) @@ -258,7 +258,7 @@ do mkdir -p "${1}/${keymaps[$i]}/Root/" mkdir -p "${1}/${keymaps[$i]}/Scripts/" - sed "s/@@KEYMAP@@/${keymaps[$i]}/g" "${pkgroot}/Scripts/Keymaps/postinstall" > "${1}/${keymaps[$i]}/Scripts/postinstall" && \ + sed "s/@@KEYMAP@@/${keymaps[$i]}/g" "${pkgroot}/Scripts/Keymaps/postinstall.in" > "${1}/${keymaps[$i]}/Scripts/postinstall" && \ chmod +rx "${1}/${keymaps[$i]}/Scripts/postinstall" echo " [BUILD] ${keymaps[$i]} " buildpackage "${1}/${keymaps[$i]}" "/tmpcham" "" "start_selected=\"false\"" >/dev/null 2>&1