Load raw img file into memory for use as XNU's md0
+ ramdisk. /Extra/Postboot.img is used otherwise.
Index: trunk/PackageBuilder/package/doc/README
===================================================================
--- trunk/PackageBuilder/package/doc/README (revision 0)
+++ trunk/PackageBuilder/package/doc/README (revision 340)
@@ -0,0 +1,87 @@
+
+ Chameleon Boot Loader
+ =====================
+
+ What is it?
+ -----------
+
+ Chameleon is combination of various boot loader components. It is based
+ on David Elliott's fake EFI implementation added to Apple's boot-132
+ project. Chameleon is extended with the following key features:
+
+
+ Features
+ --------
+
+ - Device Property Injection via device-properties string in com.apple.Boot.plist
+ - hybrid boot0+boot1h loaders for both MBR and GPT partitioned disks.
+ - automatic FSB detection code even for recent AMD CPUs.
+ - Apple Software RAID support.
+ - stage2 loader (boot) can be placed as a regular file in the boot
+ partition's root folder.
+
+
+ Installation
+ ============
+
+ Normal Install (non-RAID):
+ --------------------------
+
+ Suppose that your installation is on /dev/disk0s2
+
+ - Install boot0 to the MBR:
+ sudo ./fdisk440 -f boot0 -u -y /dev/rdisk0
+
+ - Install boot1h to the partition's bootsector:
+ sudo dd if=boot1h of=/dev/rdisk0s2
+
+ - Install boot to the partition's root directory:
+ sudo cp boot /
+
+ No need to use startupfiletool anymore!
+
+
+ RAID Install:
+ -------------
+
+ Suppose that your installation is on /dev/disk3, which is either a mirror- or a
+ stripeset consisting of /dev/disk0 and /dev/disk1
+
+ Mac OS X creates a small helper partition at the end of each RAID member disk,
+ namely /dev/disk0s3 and /dev/disk1s3
+
+ - Install boot0 to the MBR of both disks:
+ sudo ./fdisk440 -f boot0 -u -y /dev/rdisk0
+ sudo ./fdisk440 -f boot0 -u -y /dev/rdisk1
+
+ - Install boot1h to the bootsector of each boot partition:
+ sudo dd if=boot1h of=/dev/rdisk0s3
+ sudo dd if=boot1h of=/dev/rdisk1s3
+
+ - Install boot to both helper partition's root directories.
+ diskutil mount disk0s3
+ cp boot /Volumes/Boot\ OSX
+ diskutil unmount disk0s3
+ diskutil mount disk1s3
+ cp boot /Volumes/Boot\ OSX
+ diskutil unmount disk1s3
+
+ Support:
+ --------
+
+ If you have any questions, issues etc. feel free to join us
+ at irc.voodooprojects.org #chameleon
+
+
+ Source Code
+ -----------
+
+ For downloading the source code please visit the project page at
+ http://chameleon.osx86.hu
+
+
+ Licensing
+ ---------
+
+ Chameleon is released under the terms and conditions of
+ Apple Public Source License (see APPLE_LICENSE).
Index: trunk/PackageBuilder/package/smbios.plist
===================================================================
--- trunk/PackageBuilder/package/smbios.plist (revision 0)
+++ trunk/PackageBuilder/package/smbios.plist (revision 340)
@@ -0,0 +1,48 @@
+
+
+
+
+ SMbiosversion
+ MP31.88Z.00C1.B00.0802091544
+ SMmanufacter
+ Apple Inc.
+ SMproductname
+ MacPro3,1
+ SMsystemversion
+ 1.0
+ SMserial
+ W87234JHYA4
+ SMexternalclock
+ 333
+ SMmaximalclock
+ 3000
+ SMmemtype
+ 19
+ SMmemspeed
+ 800
+ SMmemmanufacter_1
+ 0xAD00000000000000
+ SMmemserial_1
+ 0x00001020
+ SMmempart_1
+ 0x48594D503131325336344350362D59352020
+ SMmemmanufacter_2
+ 0xAD00000000000000
+ SMmemserial_2
+ 0x00003021
+ SMmempart_2
+ 0x48594D503131325336344350362D59352020
+ SMmemmanufacter_3
+ 0xAD00000000000000
+ SMmemserial_3
+ 0x00003021
+ SMmempart_3
+ 0x48594D503131325336344350362D59352020
+ SMmemmanufacter_4
+ 0xAD00000000000000
+ SMmemserial_4
+ 0x00003021
+ SMmempart_4
+ 0x48594D503131325336344350362D59352020
+
+
Index: trunk/PackageBuilder/package/Configuration/SMBIOSDefault/smbios.plist
===================================================================
--- trunk/PackageBuilder/package/Configuration/SMBIOSDefault/smbios.plist (revision 0)
+++ trunk/PackageBuilder/package/Configuration/SMBIOSDefault/smbios.plist (revision 340)
@@ -0,0 +1,38 @@
+
+
+
+
+ SMbiosdate
+ 20/08/2008
+ SMbiosversion
+ IM71.88Z.007A.B03.0803051705
+ SMcputype
+ 1281
+ SMexternalclock
+ 1,33
+ SMfamily
+ iMac
+ SMmanufacter
+ Apple Inc. Mac-F2268CC8
+ SMmaximalclock
+ 2,50
+ SMmemmanufacter_1
+ Team Elite
+ SMmemmanufacter_2
+ Team Elite
+ SMmempart_1
+ 50M3P4R7
+ SMmempart_2
+ 50M3P4R7
+ SMmemserial_1
+ 50M353R14L
+ SMmemserial_2
+ 50M353R14L
+ SMproductname
+ iMac7,1
+ SMserial
+ YM90295599X
+ SMsystemversion
+ 1.0
+
+
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/MacOS/Chameleon
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/MacOS/Chameleon
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Info.plist
===================================================================
--- trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Info.plist (revision 0)
+++ trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Info.plist (revision 340)
@@ -0,0 +1,36 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ English
+ CFBundleDisplayName
+
+ CFBundleExecutable
+ Chameleon
+ CFBundleIconFile
+ Chameleon.icns
+ CFBundleIdentifier
+ com.chameleon.Chameleon
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ Chameleon
+ CFBundlePackageType
+ BNDL
+ CFBundleShortVersionString
+ 2.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 2.0.0 RC4
+ NSMainNibFile
+ Chameleon
+ NSPrefPaneIconFile
+ Chameleon.icns
+ NSPrefPaneIconLabel
+ Chameleon
+ NSPrincipalClass
+ ChameleonPrefPane
+
+
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/footer.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/footer.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/gfxutil
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/gfxutil
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Chameleon.tiff
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Chameleon.tiff
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Linux.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Linux.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/chamsmall.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/chamsmall.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/version
===================================================================
--- trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/version (revision 0)
+++ trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/version (revision 340)
@@ -0,0 +1 @@
+2.0-RC4
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Chameleon.icns
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Chameleon.icns
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/CDROM.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/CDROM.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/getDevProp.sh
===================================================================
--- trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/getDevProp.sh (revision 0)
+++ trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/getDevProp.sh (revision 340)
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# getDevProp.sh
+# smbios-cham
+#
+# Created by ronan & thomas on 12/08/09.
+# Copyright 2009 org.darwinx86.app. All rights reserved.
+# adapted for Chameleon control panel use by Rekursor
+#
+# Directories
+cdir=`dirname $0`
+tmpDir=/tmp/Chameleon
+dmpdir=${tmpDir}/devprop
+
+# Create a dump directory
+if [[ ! -d $dmpdir ]];then
+ mkdir -p $dmpdir
+fi
+if [[ ! -d $tmpDir ]];then
+ mkdir -p $tmpDir
+fi
+# Dump Device properties
+ioreg -lw0 -p IODeviceTree -n efi -r -x |grep device-properties | sed 's/.*/;s/>.*//;' | cat > $dmpdir/chameleon-devprop.hex
+
+$cdir/gfxutil -s -n -i hex -o xml $dmpdir/chameleon-devprop.hex $dmpdir/chameleon-devprop.plist
+
+
+# Splash the result up !!
+open $dmpdir/chameleon-devprop.plist
+if [[ ! -d $dmpdir ]];then
+ rm -r $dmpdir
+fi
+if [[ ! -d $tmpDir ]];then
+ rm -r $tmpDir
+fi
+
+#end
+#echo $?
\ No newline at end of file
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/getDevProp.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/advanced.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/advanced.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/plug.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/plug.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/French.lproj/Chameleon.nib
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/French.lproj/Chameleon.nib
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/French.lproj/Chameleon.strings
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/French.lproj/Chameleon.strings
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/French.lproj/Localizable.strings
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/French.lproj/Localizable.strings
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Spanish.lproj/Chameleon.nib
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Spanish.lproj/Chameleon.nib
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Spanish.lproj/Chameleon.strings
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Spanish.lproj/Chameleon.strings
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Spanish.lproj/Localizable.strings
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Spanish.lproj/Localizable.strings
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/cham.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/cham.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/flag.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/flag.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/README
===================================================================
--- trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/README (revision 0)
+++ trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/README (revision 340)
@@ -0,0 +1,35 @@
+-----------------------------------
+Chameleon System Preferences panel
+by rekursor 1/17/2010
+-----------------------------------
+
+How to Install:
+ Double click on the panel file to install the resource
+
+Configuration:
+ The persistent configuration file is a all users level preferences property list
+ located in In /Library/Preferences/com.chameleon.prefPane.plist.
+
+ The swap disk fix option might be use if your disk order from chameleon is different
+ from what diskutil list returns.
+ Ideally we should not need this fix, but as for now, I don't know another way to do it
+
+ In /Library/Preferences/com.chameleon.prefPane.plist:
+ you can insert a 'forceBootConfigPath' key with your com.apple.Boot,plist file path:
+ So if automatic detection does not work, then force your com.apple.Boot.plist path here.
+
+ Freeze Partitions (lock the partition list and prevent autodetection to happen)
+ You can also decide to freeze the partitions to prevent automatic detection,
+ if disk order is not matching after the boot or if you don't want the list to change
+ each time that a usb key is inserted, then use this feature.
+ For it to work, you will need first to click on:
+ Settings/Boot Selector Fixes/Inject Parts In Freeze File
+ Then all your automatically detected current partitions are injected in the pref. file,
+ all you need to do is to manually edit them to change their disk id/partition id
+ (2 first parameters in the pref. file under the partitionList key)
+
+Troubleshooting
+ If the panel sees your com.apple.boot.plist in the status box, but the boot selection
+ seem to have no effect, it might be that you have more than one bootConfig file
+ and that the chameleon booter does not load the one that the panel selected,
+ see upper to force the bootConfig to match the one loaded by the chameleon booter.
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/CREDITS
===================================================================
--- trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/CREDITS (revision 0)
+++ trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/CREDITS (revision 340)
@@ -0,0 +1,17 @@
+Initial Conception & Design:
+---------------------------
+Rekursor
+
+Crew Members
+----------
+Rekursor, DieBuche
+
+Contributors & Testers:
+---------------------
+BlackOSX, MasterChief, digital_dreamer, smith@@, scrax, quinielascom
+
+Chameleon also reuses:
+---------------------
+Courtesy of Ronan (Lizard):
+Existing scripts and gfxutil tool from Lizard available at:
+http://code.google.com/p/lizard-app/
\ No newline at end of file
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/German.lproj/Chameleon.nib
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/German.lproj/Chameleon.nib
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/German.lproj/Chameleon.strings
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/German.lproj/Chameleon.strings
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/German.lproj/Localizable.strings
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/German.lproj/Localizable.strings
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/background.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/background.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/cdBootCreator.sh
===================================================================
--- trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/cdBootCreator.sh (revision 0)
+++ trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/cdBootCreator.sh (revision 340)
@@ -0,0 +1,104 @@
+#!/bin/sh
+
+# Copyright 2009 org.darwinx86.app. All rights reserved.
+
+# Directories
+extra=/tmp/isodir
+mydir=`dirname $0`
+tempDir=/tmp
+finaldir=~/Desktop
+isodir=/tmp/newiso
+extradir=/tmp/newiso/Extra
+preDir=/tmp/newiso/Extra/Preboot/
+prebootDir=/tmp/newiso/Extra/Preboot/Extra
+backDir=~/Desktop/Lizard
+bkpdir=~/Desktop/Lizard/Previous-dmg
+
+echo "Starting script..."
+
+#errors
+if ([ ! -f $extra/Extensions.mkext ] && [ ! -d $extra/Extensions ]);then
+ echo "- Error: no Extensions.mkext or Extensions folder. One of them is required"
+ echo " ------------------------"
+ exit
+fi
+
+if [ ! -f $extra/com.apple.Boot.plist ];then
+ echo "- Error: no com.apple.boot.plist found. File required"
+ echo " ------------------------"
+ exit
+fi
+if [ ! -f $extra/cdboot ];then
+ echo "- Error: no cdboot found. File required"
+ echo " ------------------------"
+ exit
+fi
+
+# Create a work directory
+echo " - temps folders created"
+echo " - Checking files"
+#copy Extra files to temp directory
+if [ -f $extra/cdboot ];then
+ cp -R $extra/cdboot $isodir
+fi
+
+if [ -f $extra/dsdt.aml ];then
+ cp -R $extra/dsdt.aml $prebootDir
+fi
+
+if [ -f $extra/DSDT.aml ];then
+ cp -R $extra/DSDT.aml $prebootDir
+fi
+
+if [ -f $extra/NVIDIA.ROM ];then
+ cp -R $extra/NVIDIA.ROM $prebootDir
+fi
+
+if [ -f $extra/smbios.plist ];then
+ cp -R $extra/smbios.plist $prebootDir
+fi
+
+if [ -f $extra/Extensions.mkext ];then
+ cp -R $extra/Extensions.mkext $prebootDir
+fi
+
+if [ -d $extra/Extensions ];then
+ cp -Rp $extra/Extensions $prebootDir
+fi
+
+if [ -f $extra/com.apple.Boot.plist ];then
+ cp -R $extra/com.apple.Boot.plist $prebootDir
+fi
+if [ -f $tempDir/com.apple.Boot.plist ];then
+ cp -R $tempDir/com.apple.Boot.plist $extradir
+fi
+
+echo "- Files copied in temp folder"
+
+# ramdisk creator
+hdiutil create -srcfolder $preDir/ -layout GPTSPUD -fs HFS+ -format UDRW -volname Preboot $extradir/Preboot.dmg
+rm -R $preDir
+echo " - ram disk created"
+
+# boot cd creator
+hdiutil makehybrid -o BootCD.iso $isodir/ -iso -hfs -joliet -eltorito-boot $isodir/cdboot -no-emul-boot -hfs-volume-name "Boot CD" -joliet-volume-name "Boot CD"
+echo " - hybrid image created"
+
+# Create output and backup directories
+if [ -f $finaldir/BootCD.iso ];then
+ if [ ! -d $bkpdir ];then
+ mkdir $backDir
+ mkdir $bkpdir
+ echo " - backup folder created"
+ fi
+ mv -f $finaldir/BootCD.iso $bkpdir/BootCd-$(date +"%d-%y-%Hh%M").iso
+ echo " - previous ISO moved into backup folder"
+fi
+mv BootCD.iso $finaldir
+echo " - ISO moved on desktop"
+
+# cleanup
+echo " - Perform cleaning"
+echo " - ISO created succefully"
+echo " ------------------------"
+exit 0
\ No newline at end of file
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/cdBootCreator.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/name.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/name.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/syringe.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/syringe.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/TODO
===================================================================
--- trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/TODO (revision 0)
+++ trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/TODO (revision 340)
@@ -0,0 +1,12 @@
+Future version (codename: Gandalf) Plans
+----------------------------------------
+Implement most if not all of the Chameleon bootConfig parameters in the table view of the current prefpane : let the Magic happening !
+
+Current versions todo list
+--------------------------
+ - Graphical Design (icons and other graphical matter..) management -> DieBuche
+ - Add WebView in About Panel for nicer Kredits.
+ - Localization -> DieBuche, get someone to have a look over German, Italian, Spanish loc. Add Portuguese (thiagomorales ?)
+ - Don't filter out soft-raids, which only have a disk identifier & no partition number
+ - Try to investigate if there is a better way to get the partition list
+ (currently done with diskutil list) probably with Chameleon booter RC6.
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Italian.lproj/Chameleon.nib
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Italian.lproj/Chameleon.nib
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Italian.lproj/Chameleon.strings
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Italian.lproj/Chameleon.strings
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Italian.lproj/Localizable.strings
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Italian.lproj/Localizable.strings
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/chip.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/chip.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/CHANGES
===================================================================
--- trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/CHANGES (revision 0)
+++ trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/CHANGES (revision 340)
@@ -0,0 +1,47 @@
+- Added About Dialog, made the displayed version numbers all rely on the info.plist file
+- Fixed refresh and on checked associated button state, made sure the string is disabled if value is 0
+- Fixed crash when using swap hd 0<->2
+- Added a new option type (OptionFileString) that features an open dialog box to open files
+- Added few Combo boxes to simplify text inputs
+- Added Missing ForceHPET option and Theme options
+- Added a new SMBIOS panel only opening a file (in construction)
+- Added new EFI Injection panel
+- Added PciRoot, GUI boot options
+- Added scrax to credits: thx for testing the Chameleon PrefPane!
+- Create a makebin script (to enhance) that creates zip archives and sets a version
+ in the bin dir
+- Fixed default value to Yes not included in the boot config would not be checked
+ by default in interface
+- Added RestartFix boot option
+- Added forceBootConfigPath to the tabview panel for quicker setup, so now no
+ need to edit the preferences file manually.
+- Added SystemId
+- Added full bootOptions loading into the interface with no custom code needed,
+ all loading features are implemented in base class PreferencesControllerBase,
+ with the automatic parser engine.
+- Implemented the bootOption automatic and generic parsing engine.
+ Now any option is parsed from bootFile automatically (incl. defaults)
+ thanks to the underlying engine based on a dynamically constructed
+ id to desc map and also to the group panel registration init process
+- Fixed dmg archives would appear in dynamic partition listing
+- Added FREEZE (lock) features, see README.
+- Refined cosmetics for the GUI
+- Added images icon on the first column of each partition entries
+- Added APSL and README for instructions
+- Added swap disk (01 and 02) fixes
+- Added Rename and Hide display from bootConfig
+- Fixed 10.5 and 10.6 would crash because of memory references erased
+- Added more bootConfig paths and an option to force it
+ (i.e:if not found automatically)
+- Added new paths for bootConfig search now looking in this order:
+ "/",
+ "/Extra/",
+ "/Volumes/EFI/Extra/",
+ "/Volumes/Cham/Extra/",
+ "/Volumes/BootLoaders/Extra/",
+ "/Library/Preferences/SystemConfiguration/",
+- Change the restart by replacing the internal reboot shell cmd by an applescript
+ eq. to the AppleMenu/Restart command
+- Fixed nib file loading and initialization problem, possibly fixes the lock pb as well?
+- Added Apple_Free filter to filter these free partitions
+
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/wrench.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/wrench.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Windows.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/Windows.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/MacOSX.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/MacOSX.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/disk.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/disk.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/English.lproj/InfoPlist.strings
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/English.lproj/InfoPlist.strings
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/English.lproj/Chameleon.nib
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/English.lproj/Chameleon.nib
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/English.lproj/Chameleon.strings
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/English.lproj/Chameleon.strings
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/English.lproj/Localizable.strings
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/PrefPanel/Chameleon.prefPane/Contents/Resources/English.lproj/Localizable.strings
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/MacOS/applet
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/MacOS/applet
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/Info.plist
===================================================================
--- trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/Info.plist (revision 0)
+++ trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/Info.plist (revision 340)
@@ -0,0 +1,35 @@
+
+
+
+
+ CFBundleAllowMixedLocalizations
+
+ CFBundleDevelopmentRegion
+ English
+ CFBundleExecutable
+ applet
+ CFBundleIconFile
+ applet
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ EFI - Mount
+ CFBundlePackageType
+ APPL
+ CFBundleSignature
+ aplt
+ LSRequiresCarbon
+
+ WindowState
+
+ name
+ ScriptWindowState
+ positionOfDivider
+ 524
+ savedFrame
+ 9 152 833 726 0 0 1440 878
+ selectedTabView
+ result
+
+
+
Property changes on: trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/Info.plist
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/Resources/applet.icns
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/Resources/applet.icns
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/Resources/description.rtfd/TXT.rtf
===================================================================
--- trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/Resources/description.rtfd/TXT.rtf (revision 0)
+++ trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/Resources/description.rtfd/TXT.rtf (revision 340)
@@ -0,0 +1,4 @@
+{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430
+{\fonttbl}
+{\colortbl;\red255\green255\blue255;}
+}
\ No newline at end of file
Property changes on: trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/Resources/description.rtfd/TXT.rtf
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/Resources/Scripts/main.scpt
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/Resources/Scripts/main.scpt
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/Resources/applet.rsrc
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/Resources/applet.rsrc
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/PkgInfo
===================================================================
--- trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/PkgInfo (revision 0)
+++ trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/PkgInfo (revision 340)
@@ -0,0 +1 @@
+APPLaplt
\ No newline at end of file
Property changes on: trunk/PackageBuilder/package/Configuration/EFIMounter/EFI Mounter.app/Contents/PkgInfo
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/HFS/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/HFS/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/HFS/postinstall (revision 340)
@@ -0,0 +1,252 @@
+#!/bin/bash
+
+diskloader="/usr/standalone/i386/boot0"
+partitionloader="/usr/standalone/i386/boot1h"
+filesystemloader="/usr/standalone/i386/boot"
+bootervolumename="EFI"
+booterextensions="Extra/Extensions"
+
+bootresources="${0%/*}"
+
+diskmicrocodetype[1]="GRUB,47525542"
+diskmicrocodetype[2]="LILO,4c494c4f"
+
+start ()
+{
+# $1 volume
+
+osxvolume="${@}"
+
+if [ -z "${osxvolume}" ]; then
+ echo
+ echo "Cannot find the volume. Exiting."
+ exit
+fi
+
+bootdev=$( df "${osxvolume}" | sed -n '2p' | awk '{print $1}' )
+
+if [ "${bootdev}" = "${bootdev#*disk*s}" ]; then
+ echo
+ echo "ERROR Volume does not use slices."
+ echo "Volume may be stored on a RAID array."
+ echo
+ exit
+fi
+
+partitiontable=$( dd 2>/dev/null if=${bootdev%s*} count=1 skip=1 | dd 2>/dev/null count=8 bs=1 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+if [ "${partitiontable:0:16}" == "4546492050415254" ]; then
+ partitiontable=$( dd 2>/dev/null if=${bootdev%s*} count=1 | dd 2>/dev/null count=64 bs=1 skip=446 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+ if [ "${partitiontable:8:2}" == "ee" ]; then
+ if [ "${partitiontable:40:2}" == "00" ] && [ "${partitiontable:72:2}" == "00" ] && [ "${partitiontable:104:2}" == "00" ]; then
+ partitiontable="GPT"
+ else
+ partitiontable="GPT/MBR"
+ fi
+ fi
+else
+ echo
+ echo "ERROR Volume is not on a GPT partitioned disc."
+ echo
+ exit
+fi
+
+echo "${partitiontable} found."
+
+echo "OS X Volume is ${osxvolume}"
+echo "OX X Volume device is ${bootdev}"
+
+bootvolume="/Volumes/$bootervolumename"
+bootdev=${bootdev%s*}s1
+bootrdev=${bootdev/disk/rdisk}
+bootdisk=${bootdev%s*}
+bootrdisk=${bootdisk/disk/rdisk}
+bootslice=${bootdev#*disk*s}
+
+echo "EFI Volume device is ${bootdev}"
+echo "EFI Volume raw device is ${bootrdev}"
+echo "EFI Volume slice is ${bootslice}"
+echo "Disk device is ${bootdisk}"
+echo "Disk raw device is ${bootrdisk}"
+echo "Disk loader is ${diskloader}"
+echo "Partition loader is ${partitionloader}"
+echo "Filesystem loader is ${filesystemloader}"
+
+}
+
+checkdiskmicrocodetype ()
+{
+diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+diskmicrocodetypecounter=0
+while [ ${diskmicrocodetypecounter} -lt ${#diskmicrocodetype[@]} ]; do
+ diskmicrocodetypecounter=$(( ${diskmicrocodetypecounter} + 1 ))
+ diskmicrocodetypeid=${diskmicrocodetype[${diskmicrocodetypecounter}]#*,}
+ if [ ! "${diskmicrocode}" = "${diskmicrocode/${diskmicrocodetypeid}/}" ]; then
+ echo "${diskmicrocodetype[${diskmicrocodetypecounter}]%,*} found."
+ fi
+done
+}
+
+checkdiskmicrocode ()
+{
+# 1 action ( check or set )
+
+diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+diskmicrocodemd5=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | md5 )
+
+if [ $( echo "${diskmicrocode}" | awk -F0 '{print NF-1}' ) = 874 ]; then
+ if [ "${1}" = "set" ]; then
+ echo "No disk microcode found. Updating."
+ diskupdate=true
+ else
+ echo "No disk microcode found."
+ fi
+else
+ if [ ${1} = set ]; then
+ echo "Disk microcode found. Preserving."
+ else
+ echo "Disk microcode found."
+ fi
+ echo "Disk microcode MD5 is ${diskmicrocodemd5}"
+fi
+}
+
+checkdisksignature ()
+{
+disksignature=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=4 bs=1 skip=440 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+if [ $( echo "${disksignature}" | awk -F0 '{print NF-1}' ) = 8 ]; then
+ echo "No disk signature found."
+else
+ echo "Disk signature found."
+ echo "Disk signature is 0x${disksignature}"
+fi
+}
+
+checkpartitionbootcode ()
+{
+# 1 action ( check or set )
+
+partitionbootcode=$( dd if=${bootrdev} count=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+partitionbootcodeextended=$( dd if=${bootrdev} count=1 skip=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+if [ $( echo "${partitionbootcode}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
+ if [ "${1}" = "set" ]; then
+ echo "No partition bootcode found. Updating."
+ else
+ echo "No partition bootcode found."
+ fi
+else
+ if [ "${1}" = "set" ]; then
+ echo "Partition bootcode found. Overwriting."
+ else
+ echo "Partition bootcode found."
+ fi
+ if [ $( echo "${partitionbootcodeextended}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
+ partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=1 | md5 )
+ else
+ partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=2 | md5 )
+ echo "Partition bootcode is dual sector."
+ fi
+ echo "Partition bootcode MD5 is ${partitionbootcodemd5}"
+fi
+}
+
+checkpartitionactive ()
+{
+partitionactive=$( fdisk440 -d ${bootrdisk} | grep -n "*" | awk -F: '{print $1}')
+
+if [ -n "${partitionactive}" ]; then
+ echo "Partition flagged active is ${partitionactive}"
+else
+ echo "No partition flagged active."
+fi
+
+}
+
+start ${3}
+
+if [ "$( df | grep ${bootdev} )" ]; then
+ umount -f ${bootdev}
+fi
+
+if ! [ "$( fstyp ${bootdev} | grep hfs )" ]; then
+ echo "${bootdev} isn't a HFS partition"
+ echo "Executing command: newfs_hfs -v ${bootervolumename} ${bootdev}"
+ newfs_hfs -v "${bootervolumename}" "${bootdev}"
+else
+ echo "${bootdev} is already a HFS partition (skipping)"
+fi
+
+diskupdate=false
+checkdiskmicrocodetype
+checkdiskmicrocode set
+checkdisksignature
+checkpartitionbootcode set
+checkpartitionactive
+
+if ${diskupdate}; then
+ echo "Executing command: fdisk440 -u -f ${diskloader} -y ${bootdisk}"
+ fdisk440 -u -f "${osxvolume}/${diskloader}" -y ${bootdisk}
+fi
+
+echo "Executing command: dd if=${partitionloader} of=${bootrdev}"
+dd if="${osxvolume}/${partitionloader}" of=${bootrdev}
+
+# If table is GPT make the first partition active (BadAxe compatibility).
+[ "${partitiontable}" = "GPT" ] && bootslice=1
+if [[ "${partitiontable}" = "GPT" ]]; then
+ fdisk440 -e ${bootdisk} <<-MAKEACTIVE
+ print
+ flag ${bootslice}
+ write
+ y
+ quit
+ MAKEACTIVE
+fi
+
+checkdiskmicrocode check
+checkdisksignature
+checkpartitionbootcode check
+checkpartitionactive
+
+[ -d "${bootvolume}" ] || mkdir -p "${bootvolume}"
+echo "Executing command: mount_hfs ${bootdev} ${bootvolume}"
+mount_hfs "${bootdev}" "${bootvolume}"
+
+echo "Executing command: cp ${osxvolume}${filesystemloader} ${bootvolume}/boot"
+cp "${osxvolume}${filesystemloader}" "${bootvolume}/boot"
+
+#if ! [ -d "${bootvolume}/Extra/Extensions" ]; then
+# echo "Executing command: mkdir -p ${bootvolume}/Extra/Extensions"
+# mkdir -p "${bootvolume}/Extra/Extensions"
+#fi
+# unpack any existing Extensions.mkext already on the booter volume
+#if [ -e "${bootvolume}/Extra/Extensions.mkext" ]; then
+# echo "Executing command: mkextunpack -d ${bootvolume}/Extra/Extensions ${bootvolume}/Extra/Extensions.mkext"
+# mkextunpack -d "${bootvolume}/Extra/Extensions" "${bootvolume}/Extra/Extensions.mkext"
+# echo "Executing command: rm -R -f ${bootvolume}/Extra/Extensions.mkext"
+# rm -R -f "${bootvolume}/Extra/Extensions.mkext"
+#fi
+
+# copy existing /Extra
+#if [ -d "${2}/Extra" ]; then
+# [ -d "${bootvolume}/Extra/Extensions" ] || mkdir -p "${bootvolume}/Extra/Extensions"
+# echo "Executing command: find ${2}/Extra -name '*.plist' -depth 1 -exec cp -f {} ${bootvolume}/Extra \;"
+# find "${2}/Extra" -name '*.plist' -depth 1 -exec cp -f {} "${bootvolume}/Extra/" \;
+# if [ -f "${2}/Extra/Extensions.mkext" ]; then
+# echo "Executing command: mkextunpack -d ${2}/Extra/Extensions ${2}/Extra/Extensions.mkext"
+# mkextunpack -d "${bootvolume}/Extra/Extensions" "${2}/Extra/Extensions.mkext"
+# fi
+# if [ -d "${2}/Extra/Extensions" ]; then
+# echo "Executing command: find ${2}/Extra/Extensions -name '*.kext' -depth 1 -exec cp -R {} ${bootvolume}/Extra/Extensions \;"
+# find "${2}/Extra/Extensions" -name '*.kext' -depth 1 -exec cp -R {} "${bootvolume}/Extra/Extensions" \;
+# fi
+#fi
+
+# setup link for extras
+#[ -h "${2}/.Chameleon" ] && unlink "${2}/.Chameleon"
+#echo "Executing command: ln -s /Volumes/${bootervolumename} ${2}/.Chameleon"
+#ln -s "/Volumes/${bootervolumename}" "${2}/.Chameleon"
+
+exit
\ No newline at end of file
Property changes on: trunk/PackageBuilder/package/Scripts/HFS/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Standard/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Standard/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Standard/postinstall (revision 340)
@@ -0,0 +1,230 @@
+#!/bin/bash
+
+
+diskloader="boot0"
+partitionloader="boot1h"
+filesystemloader="boot"
+
+diskmicrocodetype[1]="GRUB,47525542"
+diskmicrocodetype[2]="LILO,4c494c4f"
+
+start ()
+{
+# 1 volume
+
+bootvolume="${@}"
+echo "Volume is $bootvolume"
+bootresources="${0%/*}"
+echo "$bootresources"
+
+if [ -z "${bootvolume}" ]; then
+ echo
+ echo "Cannot find the volume. Exiting."
+ echo
+ exit
+fi
+
+bootdev=$( df "${bootvolume}" | sed -n '2p' | awk '{print $1}' )
+bootrdev=${bootdev/disk/rdisk}
+
+if [ "${bootdev}" = "${bootdev#*disk*s}" ]; then
+ echo
+ echo "ERROR Volume does not use slices."
+ echo
+ exit
+fi
+
+bootdisk=${bootdev%s*}
+bootrdisk=${bootdisk/disk/rdisk}
+bootslice=${bootdev#*disk*s}
+
+echo "Volume is ${bootvolume}"
+echo "Volume device is ${bootdev}"
+echo "Volume raw device is ${bootrdev}"
+echo "Volume slice is ${bootslice}"
+echo "Disk device is ${bootdisk}"
+echo "Disk raw device is ${bootrdisk}"
+echo "Disk loader is ${diskloader}"
+echo "Partition loader is ${partitionloader}"
+echo "Filesystem loader is ${filesystemloader}"
+echo "Boot Resources is ${bootresources}"
+
+}
+
+checkdiskmicrocodetype ()
+{
+diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+diskmicrocodetypecounter=0
+while [ ${diskmicrocodetypecounter} -lt ${#diskmicrocodetype[@]} ]; do
+ diskmicrocodetypecounter=$(( ${diskmicrocodetypecounter} + 1 ))
+ diskmicrocodetypeid=${diskmicrocodetype[${diskmicrocodetypecounter}]#*,}
+ if [ ! "${diskmicrocode}" = "${diskmicrocode/${diskmicrocodetypeid}/}" ]; then
+ echo "${diskmicrocodetype[${diskmicrocodetypecounter}]%,*} found."
+ fi
+done
+}
+
+checkdiskmicrocode ()
+{
+# 1 action ( check or set )
+
+diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+diskmicrocodemd5=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | md5 )
+
+if [ $( echo "${diskmicrocode}" | awk -F0 '{print NF-1}' ) = 874 ]; then
+ if [ "${1}" = "set" ]; then
+ echo "No disk microcode found. Updating."
+ diskupdate=true
+ else
+ echo "No disk microcode found."
+ fi
+else
+ if [ ${1} = set ]; then
+ echo "Disk microcode found. Preserving."
+ else
+ echo "Disk microcode found."
+ fi
+ echo "Disk microcode MD5 is ${diskmicrocodemd5}"
+fi
+}
+
+checkdisksignature ()
+{
+disksignature=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=4 bs=1 skip=440 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+if [ $( echo "${disksignature}" | awk -F0 '{print NF-1}' ) = 8 ]; then
+ echo "No disk signature found."
+else
+ echo "Disk signature found."
+ echo "Disk signature is 0x${disksignature}"
+fi
+}
+
+checkpartitionbootcode ()
+{
+# 1 action ( check or set )
+
+partitionbootcode=$( dd if=${bootrdev} count=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+partitionbootcodeextended=$( dd if=${bootrdev} count=1 skip=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+if [ $( echo "${partitionbootcode}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
+ if [ "${1}" = "set" ]; then
+ echo "No partition bootcode found. Updating."
+ else
+ echo "No partition bootcode found."
+ fi
+else
+ if [ "${1}" = "set" ]; then
+ echo "Partition bootcode found. Overwriting."
+ else
+ echo "Partition bootcode found."
+ fi
+ if [ $( echo "${partitionbootcodeextended}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
+ partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=1 | md5 )
+ else
+ partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=2 | md5 )
+ echo "Partition bootcode is dual sector."
+ fi
+ echo "Partition bootcode MD5 is ${partitionbootcodemd5}"
+fi
+}
+
+checkpartitionactive ()
+{
+partitionactive=$( fdisk440 -d ${bootrdisk} | grep -n "*" | awk -F: '{print $1}')
+
+if [ -n "${partitionactive}" ]; then
+ echo "Partition flagged active is ${partitionactive}"
+else
+ echo "No partition flagged active."
+fi
+
+}
+
+start ${3}
+
+#partitiontable=$( diskutil list ${bootdisk} | sed -n '3p' | awk '{print $2}' )
+#[ "${partitiontable}" = "GUID_partition_scheme" ] && echo "GPT found."
+#[ "${partitiontable}" = "FDisk_partition_scheme" ] && echo "MBR found."
+#[ "${partitiontable}" = "Apple_partition_scheme" ] && echo "APT found." && exit
+
+partitiontable=$( dd 2>/dev/null if=${bootdisk} count=1 skip=1 | dd 2>/dev/null count=8 bs=1 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+if [ "${partitiontable:0:16}" == "4546492050415254" ]; then
+ partitiontable=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=64 bs=1 skip=446 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+ if [ "${partitiontable:8:2}" == "ee" ]; then
+ if [ "${partitiontable:40:2}" == "00" ] && [ "${partitiontable:72:2}" == "00" ] && [ "${partitiontable:104:2}" == "00" ]; then
+ partitiontable="GPT"
+ else
+ partitiontable="GPT/MBR"
+ fi
+ fi
+else
+ partitiontable="MBR"
+fi
+
+echo "${partitiontable} found."
+
+diskupdate=false
+
+checkdiskmicrocodetype
+checkdiskmicrocode set
+checkdisksignature
+checkpartitionbootcode set
+checkpartitionactive
+
+if ${diskupdate}; then
+ echo "Executing command: fdisk -u -f /usr/standalone/i386/${diskloader} -y ${bootdisk}"
+ fdisk -u -f "${bootvolume}/usr/standalone/i386/${diskloader}" -y ${bootdisk}
+fi
+
+echo "Executing command: dd if=/usr/standalone/i386/${partitionloader} of=${bootrdev}"
+dd if="${bootvolume}/usr/standalone/i386/${partitionloader}" of=${bootrdev}
+
+echo "Executing command: cp /usr/standalone/i386/${filesystemloader} ${bootvolume}"
+cp "${bootvolume}/usr/standalone/i386/${filesystemloader}" "${bootvolume}"
+
+echo "Executing command: ${bootresources}/Tools/SetFile -a V ${bootvolume}/${filesystemloader}"
+"${bootresources}/Tools/SetFile" -a V "${bootvolume}/${filesystemloader}"
+
+# If table is GPT make the first partition active (BadAxe compatibility).
+#[ "${partitiontable}" = "GPT" ] && bootslice=1
+fdisk440 -e ${bootdisk} <<-MAKEACTIVE
+print
+flag ${bootslice}
+write
+y
+quit
+MAKEACTIVE
+
+checkdiskmicrocode check
+checkdisksignature
+checkpartitionbootcode check
+checkpartitionactive
+
+# Check efi partition
+if [ -d /Volumes/EFI ]; then
+ umount -f /Volumes/EFI
+ rm -R -f /Volumes/EFI
+fi
+
+if [ -d "${bootvolume}/Extra/Extensions" ]; then
+# echo "Executing command: mkdir -p ${bootvolume}/Extra/Extensions"
+ mkdir -p "${bootvolume}/ExtraBackup"
+ cp -f -R "${bootvolume}/Extra" "${bootvolume}/ExtraBackup"
+ rm -f -R "${bootvolume}/Extra"
+fi
+# unpack any existing Extensions.mkext already on the booter volume
+if [ -f "${2}/ExtraBackup/Extensions.mkext" ]; then
+ echo "Executing command: mkextunpack -d ${2}/Extra/Extensions ${2}/ExtraBackup/Extensions.mkext"
+ mkextunpack -d "${2}/.Chameleon/Extra/Extensions" "${2}/.Chameleon/ExtraBackup/Extensions.mkext"
+ echo "Executing command: rm -R -f ${2}/ExtraBackup/Extensions.mkext"
+ rm -R -f "${2}/ExtraBackup/Extensions.mkext"
+fi
+
+# setup link for extras
+#[ -h "${2}/.Chameleon" ] && unlink "${2}/.Chameleon"
+#echo "Executing command: ln -s . ${2}/.Chameleon"
+#ln -s "${2}" "${2}/.Chameleon"
+
+exit
\ No newline at end of file
Property changes on: trunk/PackageBuilder/package/Scripts/Standard/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Standardhfs/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Standardhfs/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Standardhfs/postinstall (revision 340)
@@ -0,0 +1,230 @@
+#!/bin/bash
+
+
+diskloader="boot0hfs"
+partitionloader="boot1h"
+filesystemloader="boot"
+
+diskmicrocodetype[1]="GRUB,47525542"
+diskmicrocodetype[2]="LILO,4c494c4f"
+
+start ()
+{
+# 1 volume
+
+bootvolume="${@}"
+echo "Volume is $bootvolume"
+bootresources="${0%/*}"
+echo "$bootresources"
+
+if [ -z "${bootvolume}" ]; then
+ echo
+ echo "Cannot find the volume. Exiting."
+ echo
+ exit
+fi
+
+bootdev=$( df "${bootvolume}" | sed -n '2p' | awk '{print $1}' )
+bootrdev=${bootdev/disk/rdisk}
+
+if [ "${bootdev}" = "${bootdev#*disk*s}" ]; then
+ echo
+ echo "ERROR Volume does not use slices."
+ echo
+ exit
+fi
+
+bootdisk=${bootdev%s*}
+bootrdisk=${bootdisk/disk/rdisk}
+bootslice=${bootdev#*disk*s}
+
+echo "Volume is ${bootvolume}"
+echo "Volume device is ${bootdev}"
+echo "Volume raw device is ${bootrdev}"
+echo "Volume slice is ${bootslice}"
+echo "Disk device is ${bootdisk}"
+echo "Disk raw device is ${bootrdisk}"
+echo "Disk loader is ${diskloader}"
+echo "Partition loader is ${partitionloader}"
+echo "Filesystem loader is ${filesystemloader}"
+echo "Boot Resources is ${bootresources}"
+
+}
+
+checkdiskmicrocodetype ()
+{
+diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+diskmicrocodetypecounter=0
+while [ ${diskmicrocodetypecounter} -lt ${#diskmicrocodetype[@]} ]; do
+ diskmicrocodetypecounter=$(( ${diskmicrocodetypecounter} + 1 ))
+ diskmicrocodetypeid=${diskmicrocodetype[${diskmicrocodetypecounter}]#*,}
+ if [ ! "${diskmicrocode}" = "${diskmicrocode/${diskmicrocodetypeid}/}" ]; then
+ echo "${diskmicrocodetype[${diskmicrocodetypecounter}]%,*} found."
+ fi
+done
+}
+
+checkdiskmicrocode ()
+{
+# 1 action ( check or set )
+
+diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+diskmicrocodemd5=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | md5 )
+
+if [ $( echo "${diskmicrocode}" | awk -F0 '{print NF-1}' ) = 874 ]; then
+ if [ "${1}" = "set" ]; then
+ echo "No disk microcode found. Updating."
+ diskupdate=true
+ else
+ echo "No disk microcode found."
+ fi
+else
+ if [ ${1} = set ]; then
+ echo "Disk microcode found. Preserving."
+ else
+ echo "Disk microcode found."
+ fi
+ echo "Disk microcode MD5 is ${diskmicrocodemd5}"
+fi
+}
+
+checkdisksignature ()
+{
+disksignature=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=4 bs=1 skip=440 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+if [ $( echo "${disksignature}" | awk -F0 '{print NF-1}' ) = 8 ]; then
+ echo "No disk signature found."
+else
+ echo "Disk signature found."
+ echo "Disk signature is 0x${disksignature}"
+fi
+}
+
+checkpartitionbootcode ()
+{
+# 1 action ( check or set )
+
+partitionbootcode=$( dd if=${bootrdev} count=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+partitionbootcodeextended=$( dd if=${bootrdev} count=1 skip=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+if [ $( echo "${partitionbootcode}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
+ if [ "${1}" = "set" ]; then
+ echo "No partition bootcode found. Updating."
+ else
+ echo "No partition bootcode found."
+ fi
+else
+ if [ "${1}" = "set" ]; then
+ echo "Partition bootcode found. Overwriting."
+ else
+ echo "Partition bootcode found."
+ fi
+ if [ $( echo "${partitionbootcodeextended}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
+ partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=1 | md5 )
+ else
+ partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=2 | md5 )
+ echo "Partition bootcode is dual sector."
+ fi
+ echo "Partition bootcode MD5 is ${partitionbootcodemd5}"
+fi
+}
+
+checkpartitionactive ()
+{
+partitionactive=$( fdisk440 -d ${bootrdisk} | grep -n "*" | awk -F: '{print $1}')
+
+if [ -n "${partitionactive}" ]; then
+ echo "Partition flagged active is ${partitionactive}"
+else
+ echo "No partition flagged active."
+fi
+
+}
+
+start ${3}
+
+#partitiontable=$( diskutil list ${bootdisk} | sed -n '3p' | awk '{print $2}' )
+#[ "${partitiontable}" = "GUID_partition_scheme" ] && echo "GPT found."
+#[ "${partitiontable}" = "FDisk_partition_scheme" ] && echo "MBR found."
+#[ "${partitiontable}" = "Apple_partition_scheme" ] && echo "APT found." && exit
+
+partitiontable=$( dd 2>/dev/null if=${bootdisk} count=1 skip=1 | dd 2>/dev/null count=8 bs=1 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+if [ "${partitiontable:0:16}" == "4546492050415254" ]; then
+ partitiontable=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=64 bs=1 skip=446 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+ if [ "${partitiontable:8:2}" == "ee" ]; then
+ if [ "${partitiontable:40:2}" == "00" ] && [ "${partitiontable:72:2}" == "00" ] && [ "${partitiontable:104:2}" == "00" ]; then
+ partitiontable="GPT"
+ else
+ partitiontable="GPT/MBR"
+ fi
+ fi
+else
+ partitiontable="MBR"
+fi
+
+echo "${partitiontable} found."
+
+diskupdate=false
+
+checkdiskmicrocodetype
+checkdiskmicrocode set
+checkdisksignature
+checkpartitionbootcode set
+checkpartitionactive
+
+if ${diskupdate}; then
+ echo "Executing command: fdisk -u -f /usr/standalone/i386/${diskloader} -y ${bootdisk}"
+ fdisk -u -f "${bootvolume}/usr/standalone/i386/${diskloader}" -y ${bootdisk}
+fi
+
+echo "Executing command: dd if=/usr/standalone/i386/${partitionloader} of=${bootrdev}"
+dd if="${bootvolume}/usr/standalone/i386/${partitionloader}" of=${bootrdev}
+
+echo "Executing command: cp /usr/standalone/i386/${filesystemloader} ${bootvolume}"
+cp "${bootvolume}/usr/standalone/i386/${filesystemloader}" "${bootvolume}"
+
+echo "Executing command: ${bootresources}/Tools/SetFile -a V ${bootvolume}/${filesystemloader}"
+"${bootresources}/Tools/SetFile" -a V "${bootvolume}/${filesystemloader}"
+
+# If table is GPT make the first partition active (BadAxe compatibility).
+[ "${partitiontable}" = "GPT" ] && bootslice=1
+fdisk440 -e ${bootdisk} <<-MAKEACTIVE
+print
+flag ${bootslice}
+write
+y
+quit
+MAKEACTIVE
+
+checkdiskmicrocode check
+checkdisksignature
+checkpartitionbootcode check
+checkpartitionactive
+
+# Check efi partition
+if [ -d /Volumes/EFI ]; then
+ umount -f /Volumes/EFI
+ rm -R -f /Volumes/EFI
+fi
+
+if ! [ -d "${bootvolume}/Extra/Extensions" ]; then
+# echo "Executing command: mkdir -p ${bootvolume}/Extra/Extensions"
+ mkdir -p "${bootvolume}/ExtraBackup"
+ cp -f -R "${bootvolume}/Extra" "${bootvolume}/ExtraBackup"
+ rm -f -R "${bootvolume}/Extra"
+fi
+# unpack any existing Extensions.mkext already on the booter volume
+if [ -f "${2}/ExtraBackup/Extensions.mkext" ]; then
+ echo "Executing command: mkextunpack -d ${2}/Extra/Extensions ${2}/ExtraBackup/Extensions.mkext"
+ mkextunpack -d "${2}/.Chameleon/Extra/Extensions" "${2}/.Chameleon/ExtraBackup/Extensions.mkext"
+ echo "Executing command: rm -R -f ${2}/ExtraBackup/Extensions.mkext"
+ rm -R -f "${2}/ExtraBackup/Extensions.mkext"
+fi
+
+# setup link for extras
+#[ -h "${2}/.Chameleon" ] && unlink "${2}/.Chameleon"
+#echo "Executing command: ln -s . ${2}/.Chameleon"
+#ln -s "${2}" "${2}/.Chameleon"
+
+exit
\ No newline at end of file
Property changes on: trunk/PackageBuilder/package/Scripts/Standardhfs/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Post/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Post/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Post/postinstall (revision 340)
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+temp="/private/tmp/Chameleon"
+
+#source com.apple.boot.plist
+if ! [ -f "${2}/.Chameleon/Extra/com.apple.Boot.plist" ]; then
+ if [ -f "${2}/Library/Preferences/SystemConfiguration/com.apple.Boot.plist" ]; then
+ cp -f "${2}/Library/Preferences/SystemConfiguration/com.apple.Boot.plist" "${2}/.Chameleon/Extra"
+ fi
+fi
+
+# fix kext permissions
+find "${2}/.Chameleon/Extra/Extensions" -type f -exec chmod 644 {} \;
+find "${2}/.Chameleon/Extra/Extensions" -type d -exec chmod 755 {} \;
+chown -R 0:0 "${2}/.Chameleon/Extra/Extensions"
+
+# build mkext for extras
+[ -d "${temp}" ] && rm -R -f "${temp}"
+mkdir -p "${temp}/Extensions"
+ditto --noextattr --noqtn --arch i386 "${2}/.Chameleon/Extra/Extensions" "${temp}/Extensions"
+find "${temp}" -type f -exec chmod 644 {} \;
+find "${temp}" -type d -exec chmod 755 {} \;
+chown -R 0:0 "${temp}"
+kextcache -m "${temp}/Extensions.mkext" "${temp}/Extensions"
+cp -f "${temp}/Extensions.mkext" "${2}/.Chameleon/Extra"
+#cp -f "${temp}/Extensions.mkext" "${2}/Extra"
+rm -f -R "${temp}"
+
+# Check efi partition
+if [ -d /Volumes/EFI ]; then
+
+# remove link for extras install
+#unlink -r "${2}/.Chameleon"
+
+ cp -R -f "${2}/.Chameleon/Extra" /Volumes/EFI/
+ umount -f /Volumes/EFI
+ rm -R -f /Volumes/EFI
+ rm -R -f "${2}/.Chameleon"
+fi
+
+ cp -R -f "${2}/.Chameleon/Extra" "${2}/"
+ rm -R -f "${2}/.Chameleon"
+
+exit 0
\ No newline at end of file
Property changes on: trunk/PackageBuilder/package/Scripts/Post/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Resolutions/1024x768x32/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Resolutions/1024x768x32/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Resolutions/1024x768x32/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Graphics Mode"
+string="1024x768x32"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Resolutions/1024x768x32/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Resolutions/1920x1200x32/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Resolutions/1920x1200x32/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Resolutions/1920x1200x32/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Graphics Mode"
+string="1920x1200x32"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Resolutions/1920x1200x32/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Resolutions/1600x900x32/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Resolutions/1600x900x32/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Resolutions/1600x900x32/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Graphics Mode"
+string="1600x900x32"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Resolutions/1600x900x32/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Resolutions/1280x1024x32/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Resolutions/1280x1024x32/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Resolutions/1280x1024x32/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Graphics Mode"
+string="1280x1024x32"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Resolutions/1280x1024x32/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Resolutions/1680x1050x32/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Resolutions/1680x1050x32/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Resolutions/1680x1050x32/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Graphics Mode"
+string="1680x1050x32"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Resolutions/1680x1050x32/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Resolutions/1920x1080x32/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Resolutions/1920x1080x32/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Resolutions/1920x1080x32/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Graphics Mode"
+string="1920x1080x32"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Resolutions/1920x1080x32/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Resolutions/1280x960x32/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Resolutions/1280x960x32/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Resolutions/1280x960x32/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Graphics Mode"
+string="1280x960x32"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Resolutions/1280x960x32/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Configuration/SMBIOSDefault/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Configuration/SMBIOSDefault/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Configuration/SMBIOSDefault/postinstall (revision 340)
@@ -0,0 +1,223 @@
+#!/bin/bash
+
+
+diskloader="boot0hfs"
+partitionloader="boot1h"
+filesystemloader="boot"
+
+diskmicrocodetype[1]="GRUB,47525542"
+diskmicrocodetype[2]="LILO,4c494c4f"
+
+start ()
+{
+# 1 volume
+
+bootvolume="${@}"
+echo "Volume is $bootvolume"
+bootresources="${0%/*}"
+echo "$bootresources"
+
+if [ -z "${bootvolume}" ]; then
+ echo
+ echo "Cannot find the volume. Exiting."
+ echo
+ exit
+fi
+
+bootdev=$( df "${bootvolume}" | sed -n '2p' | awk '{print $1}' )
+bootrdev=${bootdev/disk/rdisk}
+
+if [ "${bootdev}" = "${bootdev#*disk*s}" ]; then
+ echo
+ echo "ERROR Volume does not use slices."
+ echo
+ exit
+fi
+
+bootdisk=${bootdev%s*}
+bootrdisk=${bootdisk/disk/rdisk}
+bootslice=${bootdev#*disk*s}
+
+echo "Volume is ${bootvolume}"
+echo "Volume device is ${bootdev}"
+echo "Volume raw device is ${bootrdev}"
+echo "Volume slice is ${bootslice}"
+echo "Disk device is ${bootdisk}"
+echo "Disk raw device is ${bootrdisk}"
+echo "Disk loader is ${diskloader}"
+echo "Partition loader is ${partitionloader}"
+echo "Filesystem loader is ${filesystemloader}"
+echo "Boot Resources is ${bootresources}"
+
+}
+
+checkdiskmicrocodetype ()
+{
+diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+diskmicrocodetypecounter=0
+while [ ${diskmicrocodetypecounter} -lt ${#diskmicrocodetype[@]} ]; do
+ diskmicrocodetypecounter=$(( ${diskmicrocodetypecounter} + 1 ))
+ diskmicrocodetypeid=${diskmicrocodetype[${diskmicrocodetypecounter}]#*,}
+ if [ ! "${diskmicrocode}" = "${diskmicrocode/${diskmicrocodetypeid}/}" ]; then
+ echo "${diskmicrocodetype[${diskmicrocodetypecounter}]%,*} found."
+ fi
+done
+}
+
+checkdiskmicrocode ()
+{
+# 1 action ( check or set )
+
+diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+diskmicrocodemd5=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | md5 )
+
+if [ $( echo "${diskmicrocode}" | awk -F0 '{print NF-1}' ) = 874 ]; then
+ if [ "${1}" = "set" ]; then
+ echo "No disk microcode found. Updating."
+ diskupdate=true
+ else
+ echo "No disk microcode found."
+ fi
+else
+ if [ ${1} = set ]; then
+ echo "Disk microcode found. Preserving."
+ else
+ echo "Disk microcode found."
+ fi
+ echo "Disk microcode MD5 is ${diskmicrocodemd5}"
+fi
+}
+
+checkdisksignature ()
+{
+disksignature=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=4 bs=1 skip=440 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+if [ $( echo "${disksignature}" | awk -F0 '{print NF-1}' ) = 8 ]; then
+ echo "No disk signature found."
+else
+ echo "Disk signature found."
+ echo "Disk signature is 0x${disksignature}"
+fi
+}
+
+checkpartitionbootcode ()
+{
+# 1 action ( check or set )
+
+partitionbootcode=$( dd if=${bootrdev} count=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+partitionbootcodeextended=$( dd if=${bootrdev} count=1 skip=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+if [ $( echo "${partitionbootcode}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
+ if [ "${1}" = "set" ]; then
+ echo "No partition bootcode found. Updating."
+ else
+ echo "No partition bootcode found."
+ fi
+else
+ if [ "${1}" = "set" ]; then
+ echo "Partition bootcode found. Overwriting."
+ else
+ echo "Partition bootcode found."
+ fi
+ if [ $( echo "${partitionbootcodeextended}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
+ partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=1 | md5 )
+ else
+ partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=2 | md5 )
+ echo "Partition bootcode is dual sector."
+ fi
+ echo "Partition bootcode MD5 is ${partitionbootcodemd5}"
+fi
+}
+
+checkpartitionactive ()
+{
+partitionactive=$( fdisk440 -d ${bootrdisk} | grep -n "*" | awk -F: '{print $1}')
+
+if [ -n "${partitionactive}" ]; then
+ echo "Partition flagged active is ${partitionactive}"
+else
+ echo "No partition flagged active."
+fi
+
+}
+
+start ${3}
+
+#partitiontable=$( diskutil list ${bootdisk} | sed -n '3p' | awk '{print $2}' )
+#[ "${partitiontable}" = "GUID_partition_scheme" ] && echo "GPT found."
+#[ "${partitiontable}" = "FDisk_partition_scheme" ] && echo "MBR found."
+#[ "${partitiontable}" = "Apple_partition_scheme" ] && echo "APT found." && exit
+
+partitiontable=$( dd 2>/dev/null if=${bootdisk} count=1 skip=1 | dd 2>/dev/null count=8 bs=1 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+if [ "${partitiontable:0:16}" == "4546492050415254" ]; then
+ partitiontable=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=64 bs=1 skip=446 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+ if [ "${partitiontable:8:2}" == "ee" ]; then
+ if [ "${partitiontable:40:2}" == "00" ] && [ "${partitiontable:72:2}" == "00" ] && [ "${partitiontable:104:2}" == "00" ]; then
+ partitiontable="GPT"
+ else
+ partitiontable="GPT/MBR"
+ fi
+ fi
+else
+ partitiontable="MBR"
+fi
+
+echo "${partitiontable} found."
+
+diskupdate=false
+
+checkdiskmicrocodetype
+checkdiskmicrocode set
+checkdisksignature
+checkpartitionbootcode set
+checkpartitionactive
+
+if ${diskupdate}; then
+ echo "Executing command: fdisk -u -f /usr/standalone/i386/${diskloader} -y ${bootdisk}"
+ fdisk -u -f "${bootvolume}/usr/standalone/i386/${diskloader}" -y ${bootdisk}
+fi
+
+echo "Executing command: dd if=/usr/standalone/i386/${partitionloader} of=${bootrdev}"
+dd if="${bootvolume}/usr/standalone/i386/${partitionloader}" of=${bootrdev}
+
+echo "Executing command: cp /usr/standalone/i386/${filesystemloader} ${bootvolume}"
+cp "${bootvolume}/usr/standalone/i386/${filesystemloader}" "${bootvolume}"
+
+echo "Executing command: ${bootresources}/Tools/SetFile -a V ${bootvolume}/${filesystemloader}"
+"${bootresources}/Tools/SetFile" -a V "${bootvolume}/${filesystemloader}"
+
+# If table is GPT make the first partition active (BadAxe compatibility).
+[ "${partitiontable}" = "GPT" ] && bootslice=1
+fdisk440 -e ${bootdisk} <<-MAKEACTIVE
+print
+flag ${bootslice}
+write
+y
+quit
+MAKEACTIVE
+
+checkdiskmicrocode check
+checkdisksignature
+checkpartitionbootcode check
+checkpartitionactive
+
+if ! [ -d "${bootvolume}/Extra/Extensions" ]; then
+ echo "Executing command: mkdir -p ${bootvolume}/Extra/Extensions"
+ mkdir -p "${bootvolume}/Extra/Extensions"
+fi
+# unpack any existing Extensions.mkext already on the booter volume
+if [ -f "${2}/Extra/Extensions.mkext" ]; then
+ echo "Executing command: mkextunpack -d ${2}/Extra/Extensions ${2}/Extra/Extensions.mkext"
+ mkextunpack -d "${2}/Extra/Extensions" "${2}/Extra/Extensions.mkext"
+ echo "Executing command: rm -R -f ${2}/Extra/Extensions.mkext"
+ rm -R -f "${2}/Extra/Extensions.mkext"
+fi
+
+# setup link for extras
+#[ -h "${2}/.Chameleon" ] && unlink "${2}/.Chameleon"
+#echo "Executing command: ln -s . ${2}/.Chameleon"
+#ln -s "${2}" "${2}/.Chameleon"
+
+
+exit
Property changes on: trunk/PackageBuilder/package/Scripts/Configuration/SMBIOSDefault/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Configuration/SMBIOSDefault/preinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Configuration/SMBIOSDefault/preinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Configuration/SMBIOSDefault/preinstall (revision 340)
@@ -0,0 +1,223 @@
+#!/bin/bash
+
+
+diskloader="boot0hfs"
+partitionloader="boot1h"
+filesystemloader="boot"
+
+diskmicrocodetype[1]="GRUB,47525542"
+diskmicrocodetype[2]="LILO,4c494c4f"
+
+start ()
+{
+# 1 volume
+
+bootvolume="${@}"
+echo "Volume is $bootvolume"
+bootresources="${0%/*}"
+echo "$bootresources"
+
+if [ -z "${bootvolume}" ]; then
+ echo
+ echo "Cannot find the volume. Exiting."
+ echo
+ exit
+fi
+
+bootdev=$( df "${bootvolume}" | sed -n '2p' | awk '{print $1}' )
+bootrdev=${bootdev/disk/rdisk}
+
+if [ "${bootdev}" = "${bootdev#*disk*s}" ]; then
+ echo
+ echo "ERROR Volume does not use slices."
+ echo
+ exit
+fi
+
+bootdisk=${bootdev%s*}
+bootrdisk=${bootdisk/disk/rdisk}
+bootslice=${bootdev#*disk*s}
+
+echo "Volume is ${bootvolume}"
+echo "Volume device is ${bootdev}"
+echo "Volume raw device is ${bootrdev}"
+echo "Volume slice is ${bootslice}"
+echo "Disk device is ${bootdisk}"
+echo "Disk raw device is ${bootrdisk}"
+echo "Disk loader is ${diskloader}"
+echo "Partition loader is ${partitionloader}"
+echo "Filesystem loader is ${filesystemloader}"
+echo "Boot Resources is ${bootresources}"
+
+}
+
+checkdiskmicrocodetype ()
+{
+diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+diskmicrocodetypecounter=0
+while [ ${diskmicrocodetypecounter} -lt ${#diskmicrocodetype[@]} ]; do
+ diskmicrocodetypecounter=$(( ${diskmicrocodetypecounter} + 1 ))
+ diskmicrocodetypeid=${diskmicrocodetype[${diskmicrocodetypecounter}]#*,}
+ if [ ! "${diskmicrocode}" = "${diskmicrocode/${diskmicrocodetypeid}/}" ]; then
+ echo "${diskmicrocodetype[${diskmicrocodetypecounter}]%,*} found."
+ fi
+done
+}
+
+checkdiskmicrocode ()
+{
+# 1 action ( check or set )
+
+diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+diskmicrocodemd5=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | md5 )
+
+if [ $( echo "${diskmicrocode}" | awk -F0 '{print NF-1}' ) = 874 ]; then
+ if [ "${1}" = "set" ]; then
+ echo "No disk microcode found. Updating."
+ diskupdate=true
+ else
+ echo "No disk microcode found."
+ fi
+else
+ if [ ${1} = set ]; then
+ echo "Disk microcode found. Preserving."
+ else
+ echo "Disk microcode found."
+ fi
+ echo "Disk microcode MD5 is ${diskmicrocodemd5}"
+fi
+}
+
+checkdisksignature ()
+{
+disksignature=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=4 bs=1 skip=440 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+if [ $( echo "${disksignature}" | awk -F0 '{print NF-1}' ) = 8 ]; then
+ echo "No disk signature found."
+else
+ echo "Disk signature found."
+ echo "Disk signature is 0x${disksignature}"
+fi
+}
+
+checkpartitionbootcode ()
+{
+# 1 action ( check or set )
+
+partitionbootcode=$( dd if=${bootrdev} count=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+partitionbootcodeextended=$( dd if=${bootrdev} count=1 skip=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+if [ $( echo "${partitionbootcode}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
+ if [ "${1}" = "set" ]; then
+ echo "No partition bootcode found. Updating."
+ else
+ echo "No partition bootcode found."
+ fi
+else
+ if [ "${1}" = "set" ]; then
+ echo "Partition bootcode found. Overwriting."
+ else
+ echo "Partition bootcode found."
+ fi
+ if [ $( echo "${partitionbootcodeextended}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
+ partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=1 | md5 )
+ else
+ partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=2 | md5 )
+ echo "Partition bootcode is dual sector."
+ fi
+ echo "Partition bootcode MD5 is ${partitionbootcodemd5}"
+fi
+}
+
+checkpartitionactive ()
+{
+partitionactive=$( fdisk440 -d ${bootrdisk} | grep -n "*" | awk -F: '{print $1}')
+
+if [ -n "${partitionactive}" ]; then
+ echo "Partition flagged active is ${partitionactive}"
+else
+ echo "No partition flagged active."
+fi
+
+}
+
+start ${3}
+
+#partitiontable=$( diskutil list ${bootdisk} | sed -n '3p' | awk '{print $2}' )
+#[ "${partitiontable}" = "GUID_partition_scheme" ] && echo "GPT found."
+#[ "${partitiontable}" = "FDisk_partition_scheme" ] && echo "MBR found."
+#[ "${partitiontable}" = "Apple_partition_scheme" ] && echo "APT found." && exit
+
+partitiontable=$( dd 2>/dev/null if=${bootdisk} count=1 skip=1 | dd 2>/dev/null count=8 bs=1 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+if [ "${partitiontable:0:16}" == "4546492050415254" ]; then
+ partitiontable=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=64 bs=1 skip=446 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+ if [ "${partitiontable:8:2}" == "ee" ]; then
+ if [ "${partitiontable:40:2}" == "00" ] && [ "${partitiontable:72:2}" == "00" ] && [ "${partitiontable:104:2}" == "00" ]; then
+ partitiontable="GPT"
+ else
+ partitiontable="GPT/MBR"
+ fi
+ fi
+else
+ partitiontable="MBR"
+fi
+
+echo "${partitiontable} found."
+
+diskupdate=false
+
+checkdiskmicrocodetype
+checkdiskmicrocode set
+checkdisksignature
+checkpartitionbootcode set
+checkpartitionactive
+
+if ${diskupdate}; then
+ echo "Executing command: fdisk -u -f /usr/standalone/i386/${diskloader} -y ${bootdisk}"
+ fdisk -u -f "${bootvolume}/usr/standalone/i386/${diskloader}" -y ${bootdisk}
+fi
+
+echo "Executing command: dd if=/usr/standalone/i386/${partitionloader} of=${bootrdev}"
+dd if="${bootvolume}/usr/standalone/i386/${partitionloader}" of=${bootrdev}
+
+echo "Executing command: cp /usr/standalone/i386/${filesystemloader} ${bootvolume}"
+cp "${bootvolume}/usr/standalone/i386/${filesystemloader}" "${bootvolume}"
+
+echo "Executing command: ${bootresources}/Tools/SetFile -a V ${bootvolume}/${filesystemloader}"
+"${bootresources}/Tools/SetFile" -a V "${bootvolume}/${filesystemloader}"
+
+# If table is GPT make the first partition active (BadAxe compatibility).
+[ "${partitiontable}" = "GPT" ] && bootslice=1
+fdisk440 -e ${bootdisk} <<-MAKEACTIVE
+print
+flag ${bootslice}
+write
+y
+quit
+MAKEACTIVE
+
+checkdiskmicrocode check
+checkdisksignature
+checkpartitionbootcode check
+checkpartitionactive
+
+if ! [ -d "${bootvolume}/Extra/Extensions" ]; then
+ echo "Executing command: mkdir -p ${bootvolume}/Extra/Extensions"
+ mkdir -p "${bootvolume}/Extra/Extensions"
+fi
+# unpack any existing Extensions.mkext already on the booter volume
+if [ -f "${2}/Extra/Extensions.mkext" ]; then
+ echo "Executing command: mkextunpack -d ${2}/Extra/Extensions ${2}/Extra/Extensions.mkext"
+ mkextunpack -d "${2}/Extra/Extensions" "${2}/Extra/Extensions.mkext"
+ echo "Executing command: rm -R -f ${2}/Extra/Extensions.mkext"
+ rm -R -f "${2}/Extra/Extensions.mkext"
+fi
+
+# setup link for extras
+#[ -h "${2}/.Chameleon" ] && unlink "${2}/.Chameleon"
+#echo "Executing command: ln -s . ${2}/.Chameleon"
+#ln -s "${2}" "${2}/.Chameleon"
+
+
+exit
Property changes on: trunk/PackageBuilder/package/Scripts/Configuration/SMBIOSDefault/preinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Configuration/PrefPanel/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Configuration/PrefPanel/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Configuration/PrefPanel/postinstall (revision 340)
@@ -0,0 +1,223 @@
+#!/bin/bash
+
+
+diskloader="boot0hfs"
+partitionloader="boot1h"
+filesystemloader="boot"
+
+diskmicrocodetype[1]="GRUB,47525542"
+diskmicrocodetype[2]="LILO,4c494c4f"
+
+start ()
+{
+# 1 volume
+
+bootvolume="${@}"
+echo "Volume is $bootvolume"
+bootresources="${0%/*}"
+echo "$bootresources"
+
+if [ -z "${bootvolume}" ]; then
+ echo
+ echo "Cannot find the volume. Exiting."
+ echo
+ exit
+fi
+
+bootdev=$( df "${bootvolume}" | sed -n '2p' | awk '{print $1}' )
+bootrdev=${bootdev/disk/rdisk}
+
+if [ "${bootdev}" = "${bootdev#*disk*s}" ]; then
+ echo
+ echo "ERROR Volume does not use slices."
+ echo
+ exit
+fi
+
+bootdisk=${bootdev%s*}
+bootrdisk=${bootdisk/disk/rdisk}
+bootslice=${bootdev#*disk*s}
+
+echo "Volume is ${bootvolume}"
+echo "Volume device is ${bootdev}"
+echo "Volume raw device is ${bootrdev}"
+echo "Volume slice is ${bootslice}"
+echo "Disk device is ${bootdisk}"
+echo "Disk raw device is ${bootrdisk}"
+echo "Disk loader is ${diskloader}"
+echo "Partition loader is ${partitionloader}"
+echo "Filesystem loader is ${filesystemloader}"
+echo "Boot Resources is ${bootresources}"
+
+}
+
+checkdiskmicrocodetype ()
+{
+diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+diskmicrocodetypecounter=0
+while [ ${diskmicrocodetypecounter} -lt ${#diskmicrocodetype[@]} ]; do
+ diskmicrocodetypecounter=$(( ${diskmicrocodetypecounter} + 1 ))
+ diskmicrocodetypeid=${diskmicrocodetype[${diskmicrocodetypecounter}]#*,}
+ if [ ! "${diskmicrocode}" = "${diskmicrocode/${diskmicrocodetypeid}/}" ]; then
+ echo "${diskmicrocodetype[${diskmicrocodetypecounter}]%,*} found."
+ fi
+done
+}
+
+checkdiskmicrocode ()
+{
+# 1 action ( check or set )
+
+diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+diskmicrocodemd5=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | md5 )
+
+if [ $( echo "${diskmicrocode}" | awk -F0 '{print NF-1}' ) = 874 ]; then
+ if [ "${1}" = "set" ]; then
+ echo "No disk microcode found. Updating."
+ diskupdate=true
+ else
+ echo "No disk microcode found."
+ fi
+else
+ if [ ${1} = set ]; then
+ echo "Disk microcode found. Preserving."
+ else
+ echo "Disk microcode found."
+ fi
+ echo "Disk microcode MD5 is ${diskmicrocodemd5}"
+fi
+}
+
+checkdisksignature ()
+{
+disksignature=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=4 bs=1 skip=440 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+if [ $( echo "${disksignature}" | awk -F0 '{print NF-1}' ) = 8 ]; then
+ echo "No disk signature found."
+else
+ echo "Disk signature found."
+ echo "Disk signature is 0x${disksignature}"
+fi
+}
+
+checkpartitionbootcode ()
+{
+# 1 action ( check or set )
+
+partitionbootcode=$( dd if=${bootrdev} count=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+partitionbootcodeextended=$( dd if=${bootrdev} count=1 skip=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+if [ $( echo "${partitionbootcode}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
+ if [ "${1}" = "set" ]; then
+ echo "No partition bootcode found. Updating."
+ else
+ echo "No partition bootcode found."
+ fi
+else
+ if [ "${1}" = "set" ]; then
+ echo "Partition bootcode found. Overwriting."
+ else
+ echo "Partition bootcode found."
+ fi
+ if [ $( echo "${partitionbootcodeextended}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
+ partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=1 | md5 )
+ else
+ partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=2 | md5 )
+ echo "Partition bootcode is dual sector."
+ fi
+ echo "Partition bootcode MD5 is ${partitionbootcodemd5}"
+fi
+}
+
+checkpartitionactive ()
+{
+partitionactive=$( fdisk440 -d ${bootrdisk} | grep -n "*" | awk -F: '{print $1}')
+
+if [ -n "${partitionactive}" ]; then
+ echo "Partition flagged active is ${partitionactive}"
+else
+ echo "No partition flagged active."
+fi
+
+}
+
+start ${3}
+
+#partitiontable=$( diskutil list ${bootdisk} | sed -n '3p' | awk '{print $2}' )
+#[ "${partitiontable}" = "GUID_partition_scheme" ] && echo "GPT found."
+#[ "${partitiontable}" = "FDisk_partition_scheme" ] && echo "MBR found."
+#[ "${partitiontable}" = "Apple_partition_scheme" ] && echo "APT found." && exit
+
+partitiontable=$( dd 2>/dev/null if=${bootdisk} count=1 skip=1 | dd 2>/dev/null count=8 bs=1 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+if [ "${partitiontable:0:16}" == "4546492050415254" ]; then
+ partitiontable=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=64 bs=1 skip=446 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+ if [ "${partitiontable:8:2}" == "ee" ]; then
+ if [ "${partitiontable:40:2}" == "00" ] && [ "${partitiontable:72:2}" == "00" ] && [ "${partitiontable:104:2}" == "00" ]; then
+ partitiontable="GPT"
+ else
+ partitiontable="GPT/MBR"
+ fi
+ fi
+else
+ partitiontable="MBR"
+fi
+
+echo "${partitiontable} found."
+
+diskupdate=false
+
+checkdiskmicrocodetype
+checkdiskmicrocode set
+checkdisksignature
+checkpartitionbootcode set
+checkpartitionactive
+
+if ${diskupdate}; then
+ echo "Executing command: fdisk -u -f /usr/standalone/i386/${diskloader} -y ${bootdisk}"
+ fdisk -u -f "${bootvolume}/usr/standalone/i386/${diskloader}" -y ${bootdisk}
+fi
+
+echo "Executing command: dd if=/usr/standalone/i386/${partitionloader} of=${bootrdev}"
+dd if="${bootvolume}/usr/standalone/i386/${partitionloader}" of=${bootrdev}
+
+echo "Executing command: cp /usr/standalone/i386/${filesystemloader} ${bootvolume}"
+cp "${bootvolume}/usr/standalone/i386/${filesystemloader}" "${bootvolume}"
+
+echo "Executing command: ${bootresources}/Tools/SetFile -a V ${bootvolume}/${filesystemloader}"
+"${bootresources}/Tools/SetFile" -a V "${bootvolume}/${filesystemloader}"
+
+# If table is GPT make the first partition active (BadAxe compatibility).
+[ "${partitiontable}" = "GPT" ] && bootslice=1
+fdisk440 -e ${bootdisk} <<-MAKEACTIVE
+print
+flag ${bootslice}
+write
+y
+quit
+MAKEACTIVE
+
+checkdiskmicrocode check
+checkdisksignature
+checkpartitionbootcode check
+checkpartitionactive
+
+if ! [ -d "${bootvolume}/Extra/Extensions" ]; then
+ echo "Executing command: mkdir -p ${bootvolume}/Extra/Extensions"
+ mkdir -p "${bootvolume}/Extra/Extensions"
+fi
+# unpack any existing Extensions.mkext already on the booter volume
+if [ -f "${2}/Extra/Extensions.mkext" ]; then
+ echo "Executing command: mkextunpack -d ${2}/Extra/Extensions ${2}/Extra/Extensions.mkext"
+ mkextunpack -d "${2}/Extra/Extensions" "${2}/Extra/Extensions.mkext"
+ echo "Executing command: rm -R -f ${2}/Extra/Extensions.mkext"
+ rm -R -f "${2}/Extra/Extensions.mkext"
+fi
+
+# setup link for extras
+#[ -h "${2}/.Chameleon" ] && unlink "${2}/.Chameleon"
+#echo "Executing command: ln -s . ${2}/.Chameleon"
+#ln -s "${2}" "${2}/.Chameleon"
+
+
+exit
Property changes on: trunk/PackageBuilder/package/Scripts/Configuration/PrefPanel/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Configuration/PrefPanel/preinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Configuration/PrefPanel/preinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Configuration/PrefPanel/preinstall (revision 340)
@@ -0,0 +1,223 @@
+#!/bin/bash
+
+
+diskloader="boot0hfs"
+partitionloader="boot1h"
+filesystemloader="boot"
+
+diskmicrocodetype[1]="GRUB,47525542"
+diskmicrocodetype[2]="LILO,4c494c4f"
+
+start ()
+{
+# 1 volume
+
+bootvolume="${@}"
+echo "Volume is $bootvolume"
+bootresources="${0%/*}"
+echo "$bootresources"
+
+if [ -z "${bootvolume}" ]; then
+ echo
+ echo "Cannot find the volume. Exiting."
+ echo
+ exit
+fi
+
+bootdev=$( df "${bootvolume}" | sed -n '2p' | awk '{print $1}' )
+bootrdev=${bootdev/disk/rdisk}
+
+if [ "${bootdev}" = "${bootdev#*disk*s}" ]; then
+ echo
+ echo "ERROR Volume does not use slices."
+ echo
+ exit
+fi
+
+bootdisk=${bootdev%s*}
+bootrdisk=${bootdisk/disk/rdisk}
+bootslice=${bootdev#*disk*s}
+
+echo "Volume is ${bootvolume}"
+echo "Volume device is ${bootdev}"
+echo "Volume raw device is ${bootrdev}"
+echo "Volume slice is ${bootslice}"
+echo "Disk device is ${bootdisk}"
+echo "Disk raw device is ${bootrdisk}"
+echo "Disk loader is ${diskloader}"
+echo "Partition loader is ${partitionloader}"
+echo "Filesystem loader is ${filesystemloader}"
+echo "Boot Resources is ${bootresources}"
+
+}
+
+checkdiskmicrocodetype ()
+{
+diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+diskmicrocodetypecounter=0
+while [ ${diskmicrocodetypecounter} -lt ${#diskmicrocodetype[@]} ]; do
+ diskmicrocodetypecounter=$(( ${diskmicrocodetypecounter} + 1 ))
+ diskmicrocodetypeid=${diskmicrocodetype[${diskmicrocodetypecounter}]#*,}
+ if [ ! "${diskmicrocode}" = "${diskmicrocode/${diskmicrocodetypeid}/}" ]; then
+ echo "${diskmicrocodetype[${diskmicrocodetypecounter}]%,*} found."
+ fi
+done
+}
+
+checkdiskmicrocode ()
+{
+# 1 action ( check or set )
+
+diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+diskmicrocodemd5=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | md5 )
+
+if [ $( echo "${diskmicrocode}" | awk -F0 '{print NF-1}' ) = 874 ]; then
+ if [ "${1}" = "set" ]; then
+ echo "No disk microcode found. Updating."
+ diskupdate=true
+ else
+ echo "No disk microcode found."
+ fi
+else
+ if [ ${1} = set ]; then
+ echo "Disk microcode found. Preserving."
+ else
+ echo "Disk microcode found."
+ fi
+ echo "Disk microcode MD5 is ${diskmicrocodemd5}"
+fi
+}
+
+checkdisksignature ()
+{
+disksignature=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=4 bs=1 skip=440 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+if [ $( echo "${disksignature}" | awk -F0 '{print NF-1}' ) = 8 ]; then
+ echo "No disk signature found."
+else
+ echo "Disk signature found."
+ echo "Disk signature is 0x${disksignature}"
+fi
+}
+
+checkpartitionbootcode ()
+{
+# 1 action ( check or set )
+
+partitionbootcode=$( dd if=${bootrdev} count=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+partitionbootcodeextended=$( dd if=${bootrdev} count=1 skip=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+if [ $( echo "${partitionbootcode}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
+ if [ "${1}" = "set" ]; then
+ echo "No partition bootcode found. Updating."
+ else
+ echo "No partition bootcode found."
+ fi
+else
+ if [ "${1}" = "set" ]; then
+ echo "Partition bootcode found. Overwriting."
+ else
+ echo "Partition bootcode found."
+ fi
+ if [ $( echo "${partitionbootcodeextended}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
+ partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=1 | md5 )
+ else
+ partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=2 | md5 )
+ echo "Partition bootcode is dual sector."
+ fi
+ echo "Partition bootcode MD5 is ${partitionbootcodemd5}"
+fi
+}
+
+checkpartitionactive ()
+{
+partitionactive=$( fdisk440 -d ${bootrdisk} | grep -n "*" | awk -F: '{print $1}')
+
+if [ -n "${partitionactive}" ]; then
+ echo "Partition flagged active is ${partitionactive}"
+else
+ echo "No partition flagged active."
+fi
+
+}
+
+start ${3}
+
+#partitiontable=$( diskutil list ${bootdisk} | sed -n '3p' | awk '{print $2}' )
+#[ "${partitiontable}" = "GUID_partition_scheme" ] && echo "GPT found."
+#[ "${partitiontable}" = "FDisk_partition_scheme" ] && echo "MBR found."
+#[ "${partitiontable}" = "Apple_partition_scheme" ] && echo "APT found." && exit
+
+partitiontable=$( dd 2>/dev/null if=${bootdisk} count=1 skip=1 | dd 2>/dev/null count=8 bs=1 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+if [ "${partitiontable:0:16}" == "4546492050415254" ]; then
+ partitiontable=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=64 bs=1 skip=446 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+ if [ "${partitiontable:8:2}" == "ee" ]; then
+ if [ "${partitiontable:40:2}" == "00" ] && [ "${partitiontable:72:2}" == "00" ] && [ "${partitiontable:104:2}" == "00" ]; then
+ partitiontable="GPT"
+ else
+ partitiontable="GPT/MBR"
+ fi
+ fi
+else
+ partitiontable="MBR"
+fi
+
+echo "${partitiontable} found."
+
+diskupdate=false
+
+checkdiskmicrocodetype
+checkdiskmicrocode set
+checkdisksignature
+checkpartitionbootcode set
+checkpartitionactive
+
+if ${diskupdate}; then
+ echo "Executing command: fdisk -u -f /usr/standalone/i386/${diskloader} -y ${bootdisk}"
+ fdisk -u -f "${bootvolume}/usr/standalone/i386/${diskloader}" -y ${bootdisk}
+fi
+
+echo "Executing command: dd if=/usr/standalone/i386/${partitionloader} of=${bootrdev}"
+dd if="${bootvolume}/usr/standalone/i386/${partitionloader}" of=${bootrdev}
+
+echo "Executing command: cp /usr/standalone/i386/${filesystemloader} ${bootvolume}"
+cp "${bootvolume}/usr/standalone/i386/${filesystemloader}" "${bootvolume}"
+
+echo "Executing command: ${bootresources}/Tools/SetFile -a V ${bootvolume}/${filesystemloader}"
+"${bootresources}/Tools/SetFile" -a V "${bootvolume}/${filesystemloader}"
+
+# If table is GPT make the first partition active (BadAxe compatibility).
+[ "${partitiontable}" = "GPT" ] && bootslice=1
+fdisk440 -e ${bootdisk} <<-MAKEACTIVE
+print
+flag ${bootslice}
+write
+y
+quit
+MAKEACTIVE
+
+checkdiskmicrocode check
+checkdisksignature
+checkpartitionbootcode check
+checkpartitionactive
+
+if ! [ -d "${bootvolume}/Extra/Extensions" ]; then
+ echo "Executing command: mkdir -p ${bootvolume}/Extra/Extensions"
+ mkdir -p "${bootvolume}/Extra/Extensions"
+fi
+# unpack any existing Extensions.mkext already on the booter volume
+if [ -f "${2}/Extra/Extensions.mkext" ]; then
+ echo "Executing command: mkextunpack -d ${2}/Extra/Extensions ${2}/Extra/Extensions.mkext"
+ mkextunpack -d "${2}/Extra/Extensions" "${2}/Extra/Extensions.mkext"
+ echo "Executing command: rm -R -f ${2}/Extra/Extensions.mkext"
+ rm -R -f "${2}/Extra/Extensions.mkext"
+fi
+
+# setup link for extras
+#[ -h "${2}/.Chameleon" ] && unlink "${2}/.Chameleon"
+#echo "Executing command: ln -s . ${2}/.Chameleon"
+#ln -s "${2}" "${2}/.Chameleon"
+
+
+exit
Property changes on: trunk/PackageBuilder/package/Scripts/Configuration/PrefPanel/preinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/ForceHPET/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/ForceHPET/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/ForceHPET/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="ForceHPET"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp -f "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=y to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/ForceHPET/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/GenerateCStates/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/GenerateCStates/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/GenerateCStates/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="GenerateCStates"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/GenerateCStates/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/VBIOS/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/VBIOS/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/VBIOS/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="VBIOS"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/VBIOS/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/EHCIacquire/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/EHCIacquire/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/EHCIacquire/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="EHCIacquire"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/EHCIacquire/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/UseMemDetect/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/UseMemDetect/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/UseMemDetect/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="UseMemDetect"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/UseMemDetect/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/GUI/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/GUI/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/GUI/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="GUI"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/GUI/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/SMBIOSdefaults/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/SMBIOSdefaults/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/SMBIOSdefaults/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="SMBIOSdefault"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/SMBIOSdefaults/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/LegacyLogo/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/LegacyLogo/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/LegacyLogo/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="LegacyLogo"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/LegacyLogo/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/Wake/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/Wake/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/Wake/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Wake"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/Wake/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/BootBanner/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/BootBanner/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/BootBanner/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="BootBanner"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/BootBanner/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/GraphicsEnabler/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/GraphicsEnabler/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/GraphicsEnabler/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="GraphicsEnabler"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp -f "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=y to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/GraphicsEnabler/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/RestartFix/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/RestartFix/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/RestartFix/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="RestartFix"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/RestartFix/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/UHCIreset/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/UHCIreset/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/UHCIreset/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="UHCIreset"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=y to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/UHCIreset/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/GeneratePStates/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/GeneratePStates/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/GeneratePStates/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="GeneratePStates"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/GeneratePStates/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/DropSSDT/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/DropSSDT/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/DropSSDT/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="DropSSDT"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/DropSSDT/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/Wait/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/Wait/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/Wait/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Wait"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/Wait/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/InstantMenu/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/InstantMenu/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/InstantMenu/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="InstantMenu"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/InstantMenu/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/EthernetBuiltIn/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/EthernetBuiltIn/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/EthernetBuiltIn/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="EthernetBuiltIn"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp -f "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=y to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/EthernetBuiltIn/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/UseNvidiaROM/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/UseNvidiaROM/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/UseNvidiaROM/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="UseNvidaROM"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/UseNvidiaROM/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/ForceWake/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/ForceWake/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/ForceWake/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="ForceWake"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp -f "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=y to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/ForceWake/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/UseAtiROM/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/UseAtiROM/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/UseAtiROM/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="UseAtiROM"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/UseAtiROM/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/QuietBoot/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/QuietBoot/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/QuietBoot/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="QuietBoot"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/QuietBoot/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/Option/arch/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/Option/arch/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/Option/arch/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="arch"
+string="i386"
+
+main ()
+{
+
+ bootplist="${3}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/Option/arch/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/FAT/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/FAT/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/FAT/postinstall (revision 340)
@@ -0,0 +1,267 @@
+#!/bin/bash
+
+diskloader="/usr/standalone/i386/boot0"
+partitionloader="/usr/standalone/i386/boot1f32"
+filesystemloader="/usr/standalone/i386/boot"
+bootervolumename="EFI"
+booterextensions="Extra/Extensions"
+
+bootresources="${0%/*}"
+
+diskmicrocodetype[1]="GRUB,47525542"
+diskmicrocodetype[2]="LILO,4c494c4f"
+
+start ()
+{
+# $1 volume
+
+osxvolume="${@}"
+
+if [ -z "${osxvolume}" ]; then
+ echo
+ echo "Cannot find the volume. Exiting."
+ exit
+fi
+
+bootdev=$( df "${osxvolume}" | sed -n '2p' | awk '{print $1}' )
+
+if [ "${bootdev}" = "${bootdev#*disk*s}" ]; then
+ echo
+ echo "ERROR Volume does not use slices."
+ echo "Volume may be stored on a RAID array."
+ echo
+ exit
+fi
+
+bootuuid=$( diskutil info "$bootdev" | grep Volume\ UUID | awk {'print $3'} )
+partitiontable=$( diskutil list ${bootdev%s*} | sed -n '3p' | awk '{print $2}' )
+
+if [ ${partitiontable} != "GUID_partition_scheme" ]; then
+ echo
+ echo "ERROR Volume is not on a GPT partitioned disc."
+ echo
+ exit
+fi
+
+echo "GPT found."
+
+echo "OS X Volume is ${osxvolume}"
+echo "OX X Volume device is ${bootdev}"
+echo "OS X Volume UUID is ${bootuuid}"
+
+
+bootvolume="/Volumes/$bootervolumename"
+bootdev=${bootdev%s*}s1
+bootrdev=${bootdev/disk/rdisk}
+bootdisk=${bootdev%s*}
+bootrdisk=${bootdisk/disk/rdisk}
+bootslice=${bootdev#*disk*s}
+
+echo "EFI Volume device is ${bootdev}"
+echo "EFI Volume raw device is ${bootrdev}"
+echo "EFI Volume slice is ${bootslice}"
+echo "Disk device is ${bootdisk}"
+echo "Disk raw device is ${bootrdisk}"
+echo "Disk loader is ${diskloader}"
+echo "Partition loader is ${partitionloader}"
+echo "Filesystem loader is ${filesystemloader}"
+
+}
+
+checkdiskmicrocodetype ()
+{
+diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+diskmicrocodetypecounter=0
+while [ ${diskmicrocodetypecounter} -lt ${#diskmicrocodetype[@]} ]; do
+ diskmicrocodetypecounter=$(( ${diskmicrocodetypecounter} + 1 ))
+ diskmicrocodetypeid=${diskmicrocodetype[${diskmicrocodetypecounter}]#*,}
+ if [ ! "${diskmicrocode}" = "${diskmicrocode/${diskmicrocodetypeid}/}" ]; then
+ echo "${diskmicrocodetype[${diskmicrocodetypecounter}]%,*} found."
+ fi
+done
+}
+
+checkdiskmicrocode ()
+{
+# 1 action ( check or set )
+
+diskmicrocode=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+diskmicrocodemd5=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=1 bs=437 | md5 )
+
+if [ $( echo "${diskmicrocode}" | awk -F0 '{print NF-1}' ) = 874 ]; then
+ if [ "${1}" = "set" ]; then
+ echo "No disk microcode found. Updating."
+ diskupdate=true
+ else
+ echo "No disk microcode found."
+ fi
+else
+ if [ ${1} = set ]; then
+ echo "Disk microcode found. Preserving."
+ else
+ echo "Disk microcode found."
+ fi
+ echo "Disk microcode MD5 is ${diskmicrocodemd5}"
+fi
+}
+
+checkdisksignature ()
+{
+disksignature=$( dd 2>/dev/null if=${bootdisk} count=1 | dd 2>/dev/null count=4 bs=1 skip=440 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+if [ $( echo "${disksignature}" | awk -F0 '{print NF-1}' ) = 8 ]; then
+ echo "No disk signature found."
+else
+ echo "Disk signature found."
+ echo "Disk signature is 0x${disksignature}"
+fi
+}
+
+checkpartitionbootcode ()
+{
+# 1 action ( check or set )
+
+partitionbootcode=$( dd if=${bootrdev} count=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+partitionbootcodeextended=$( dd if=${bootrdev} count=1 skip=1 2>/dev/null | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+if [ $( echo "${partitionbootcode}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
+ if [ "${1}" = "set" ]; then
+ echo "No partition bootcode found. Updating."
+ else
+ echo "No partition bootcode found."
+ fi
+else
+ if [ "${1}" = "set" ]; then
+ echo "Partition bootcode found. Overwriting."
+ else
+ echo "Partition bootcode found."
+ fi
+ if [ $( echo "${partitionbootcodeextended}" | awk -F0 '{print NF-1}' ) = 1024 ]; then
+ partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=1 | md5 )
+ else
+ partitionbootcodemd5=$( dd 2>/dev/null if=${bootrdev} count=2 | md5 )
+ echo "Partition bootcode is dual sector."
+ fi
+ echo "Partition bootcode MD5 is ${partitionbootcodemd5}"
+fi
+}
+
+checkpartitionactive ()
+{
+partitionactive=$( fdisk440 -d ${bootrdisk} | grep -n "*" | awk -F: '{print $1}')
+
+if [ -n "${partitionactive}" ]; then
+ echo "Partition flagged active is ${partitionactive}"
+else
+ echo "No partition flagged active."
+fi
+
+}
+
+start ${3}
+
+if [ "$( df | grep ${bootdev} )" ]; then
+ umount -f ${bootdev}
+fi
+
+#if [[ `dd if=/dev/disk${1}s1 count=8 bs=1 skip=82 | uuencode -m -|head -n 2|tail -n 1` != "RkFUMzIgICA=" ]]; then
+# echo "${bootdev} isn't a FAT32 partition"
+# newfs_msdos -v "${bootervolumename}" "${bootdev}"
+#fi
+
+if ! [ "$( fstyp ${bootdev} | grep msdos )" ]; then
+ echo "${bootdev} isn't a FAT32 partition"
+ echo "Executing command: newfs_msdos -F 32 ${bootdev}"
+ newfs_msdos -F 32 "${bootdev}"
+else
+ echo "${bootdev} is already a FAT32 partition (skipping)"
+fi
+
+diskupdate=false
+checkdiskmicrocodetype
+checkdiskmicrocode set
+checkdisksignature
+checkpartitionbootcode set
+checkpartitionactive
+
+if ${diskupdate}; then
+ echo "Executing command: fdisk440 -u -f ${diskloader} -y ${bootdisk}"
+ fdisk440 -u -f "${osxvolume}/${diskloader}" -y ${bootdisk}
+fi
+
+#echo "Executing command: dd if=${partitionloader} of=${bootrdev}"
+#dd if="${osxvolume}/${partitionloader}" of=${bootrdev}
+
+echo "Stage 1"
+
+echo "Executing command: dd if=${bootrdev} count=1 bs=512 of=/tmp/origbs"
+dd if=${bootrdev} count=1 bs=512 of=/tmp/origbs
+
+echo "Executing command: cp ${osxvolume}/${partitionloader} /tmp/newbs"
+cp "${osxvolume}/${partitionloader}" /tmp/newbs
+
+echo "Executing command: dd if=/tmp/origbs of=/tmp/newbs skip=3 seek=3 bs=1 count=87 conv=notrunc"
+dd if=/tmp/origbs of=/tmp/newbs skip=3 seek=3 bs=1 count=87 conv=notrunc
+
+echo "Executing command: dd of=${bootrdev} count=1 bs=512 if=/tmp/newbs"
+dd if=/tmp/newbs of=${bootrdev} count=1 bs=512
+
+# If table is MBR make the correct slice active. If table is GPT make the first partition active (BadAxe compatibility).
+[ "${partitiontable}" = "GUID_partition_scheme" ] && bootslice=1
+if [[ "${partitiontable}" = "FDisk_partition_scheme" || "${partitiontable}" = "GUID_partition_scheme" ]]; then
+ fdisk440 -e ${bootdisk} <<-MAKEACTIVE
+ print
+ flag ${bootslice}
+ write
+ y
+ quit
+ MAKEACTIVE
+fi
+
+checkdiskmicrocode check
+checkdisksignature
+checkpartitionbootcode check
+checkpartitionactive
+
+[ -d "${bootvolume}" ] || mkdir -p "${bootvolume}"
+echo "Executing command: mount_msdos -u 0 -g 0 ${bootdev} ${bootvolume}"
+mount_msdos -u 0 -g 0 "${bootdev}" "${bootvolume}"
+
+echo "Executing command: cp ${osxvolume}${filesystemloader} ${bootvolume}/boot"
+cp "${osxvolume}${filesystemloader}" "${bootvolume}/boot"
+#cp -R "${osxvolume}/Extra" "${bootvolume}/Extra"
+
+#if ! [ -d "${bootvolume}/Extra/Extensions" ]; then
+# echo "Executing command: mkdir -p ${bootvolume}/Extra/Extensions"
+# mkdir -p "${bootvolume}/Extra/Extensions"
+#fi
+# unpack any existing Extensions.mkext already on the booter volume
+#if [ -e "${bootvolume}/Extra/Extensions.mkext" ]; then
+# echo "Executing command: mkextunpack -d ${bootvolume}/Extra/Extensions ${bootvolume}/Extra/Extensions.mkext"
+# mkextunpack -d "${bootvolume}/Extra/Extensions" "${bootvolume}/Extra/Extensions.mkext"
+# echo "Executing command: rm -R -f ${bootvolume}/Extra/Extensions.mkext"
+# rm -R -f "${bootvolume}/Extra/Extensions.mkext"
+#fi
+
+# copy existing /Extra
+#if [ -d "${2}/Extra" ]; then
+# [ -d "${bootvolume}/Extra/Extensions" ] || mkdir -p "${bootvolume}/Extra/Extensions"
+# echo "Executing command: find ${2}/Extra -name '*.plist' -depth 1 -exec cp -f {} ${bootvolume}/Extra \;"
+# find "${2}/Extra" -name '*.plist' -depth 1 -exec cp -f {} "${bootvolume}/Extra/" \;
+# if [ -f "${2}/Extra/Extensions.mkext" ]; then
+# echo "Executing command: mkextunpack -d ${2}/Extra/Extensions ${2}/Extra/Extensions.mkext"
+# mkextunpack -d "${bootvolume}/Extra/Extensions" "${2}/Extra/Extensions.mkext"
+# fi
+# if [ -d "${2}/Extra/Extensions" ]; then
+# echo "Executing command: find ${2}/Extra/Extensions -name '*.kext' -depth 1 -exec cp -R {} ${bootvolume}/Extra/Extensions \;"
+# find "${2}/Extra/Extensions" -name '*.kext' -depth 1 -exec cp -R {} "${bootvolume}/Extra/Extensions" \;
+# fi
+#fi
+
+# setup link for extras
+#echo "Executing command: ln -s /Volumes/${bootervolumename} ${2}/.Chameleon"
+#ln -s "/Volumes/${bootervolumename}" "${2}/.Chameleon"
+# setup link for extras
+
+exit
\ No newline at end of file
Property changes on: trunk/PackageBuilder/package/Scripts/FAT/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/ForceHPET/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/ForceHPET/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/ForceHPET/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="ForceHPET"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp -f "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=y to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/ForceHPET/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/ForceHPET/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/ForceHPET/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/ForceHPET/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="ForceHPET"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp -f "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=y to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/ForceHPET/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/GenerateCStates/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/GenerateCStates/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/GenerateCStates/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="GenerateCStates"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/GenerateCStates/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/GenerateCStates/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/GenerateCStates/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/GenerateCStates/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="GenerateCStates"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/GenerateCStates/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/VBIOS/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/VBIOS/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/VBIOS/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="VBIOS"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/VBIOS/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/VBIOS/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/VBIOS/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/VBIOS/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="VBIOS"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/VBIOS/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/EHCIacquire/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/EHCIacquire/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/EHCIacquire/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="EHCIacquire"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/EHCIacquire/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/EHCIacquire/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/EHCIacquire/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/EHCIacquire/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="EHCIacquire"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/EHCIacquire/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/UseMemDetect/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/UseMemDetect/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/UseMemDetect/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="UseMemDetect"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/UseMemDetect/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/UseMemDetect/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/UseMemDetect/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/UseMemDetect/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="UseMemDetect"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/UseMemDetect/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/GUI/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/GUI/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/GUI/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="GUI"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/GUI/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/GUI/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/GUI/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/GUI/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="GUI"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/GUI/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/SMBIOSdefaults/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/SMBIOSdefaults/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/SMBIOSdefaults/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="SMBIOSdefault"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/SMBIOSdefaults/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/SMBIOSdefaults/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/SMBIOSdefaults/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/SMBIOSdefaults/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="SMBIOSdefault"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/SMBIOSdefaults/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/LegacyLogo/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/LegacyLogo/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/LegacyLogo/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="LegacyLogo"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/LegacyLogo/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/LegacyLogo/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/LegacyLogo/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/LegacyLogo/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="LegacyLogo"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/LegacyLogo/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/Wake/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/Wake/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/Wake/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Wake"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/Wake/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/Wake/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/Wake/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/Wake/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Wake"
+string="NO"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/Wake/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/BootBanner/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/BootBanner/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/BootBanner/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="BootBanner"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/BootBanner/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/BootBanner/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/BootBanner/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/BootBanner/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="BootBanner"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/BootBanner/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsEnabler/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsEnabler/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsEnabler/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="GraphicsEnabler"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp -f "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=y to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsEnabler/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsEnabler/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsEnabler/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsEnabler/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="GraphicsEnabler"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp -f "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=y to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsEnabler/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/UHCIreset/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/UHCIreset/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/UHCIreset/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="UHCIreset"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=y to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/UHCIreset/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/UHCIreset/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/UHCIreset/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/UHCIreset/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="UHCIreset"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=y to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/UHCIreset/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/RestartFix/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/RestartFix/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/RestartFix/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="RestartFix"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/RestartFix/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/RestartFix/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/RestartFix/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/RestartFix/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="RestartFix"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/RestartFix/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/GeneratePStates/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/GeneratePStates/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/GeneratePStates/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="GeneratePStates"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/GeneratePStates/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/GeneratePStates/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/GeneratePStates/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/GeneratePStates/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="GeneratePStates"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/GeneratePStates/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/DropSSDT/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/DropSSDT/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/DropSSDT/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="DropSSDT"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/DropSSDT/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/DropSSDT/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/DropSSDT/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/DropSSDT/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="DropSSDT"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/DropSSDT/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/Wait/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/Wait/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/Wait/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Wait"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/Wait/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/Wait/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/Wait/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/Wait/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Wait"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/Wait/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/InstantMenu/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/InstantMenu/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/InstantMenu/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="InstantMenu"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/InstantMenu/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/InstantMenu/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/InstantMenu/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/InstantMenu/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="InstantMenu"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/InstantMenu/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1024x768x32/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1024x768x32/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1024x768x32/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Graphics Mode"
+string="1024x768x32"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1024x768x32/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1920x1200x32/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1920x1200x32/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1920x1200x32/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Graphics Mode"
+string="1920x1200x32"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1920x1200x32/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1600x900x32/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1600x900x32/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1600x900x32/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Graphics Mode"
+string="1600x900x32"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1600x900x32/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1280x1024x32/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1280x1024x32/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1280x1024x32/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Graphics Mode"
+string="1280x1024x32"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1280x1024x32/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1680x1050x32/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1680x1050x32/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1680x1050x32/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Graphics Mode"
+string="1680x1050x32"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1680x1050x32/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1920x1080x32/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1920x1080x32/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1920x1080x32/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Graphics Mode"
+string="1920x1080x32"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1920x1080x32/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1280x960x32/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1280x960x32/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1280x960x32/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="Graphics Mode"
+string="1280x960x32"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/GraphicsMode/1280x960x32/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/EthernetBuiltIn/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/EthernetBuiltIn/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/EthernetBuiltIn/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="EthernetBuiltIn"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp -f "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=y to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/EthernetBuiltIn/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/EthernetBuiltIn/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/EthernetBuiltIn/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/EthernetBuiltIn/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="EthernetBuiltIn"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp -f "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=y to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/EthernetBuiltIn/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/UseNvidiaROM/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/UseNvidiaROM/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/UseNvidiaROM/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="UseNvidaROM"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/UseNvidiaROM/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/UseNvidiaROM/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/UseNvidiaROM/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/UseNvidiaROM/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="UseNvidaROM"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/UseNvidiaROM/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/ForceWake/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/ForceWake/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/ForceWake/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="ForceWake"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp -f "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=y to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/ForceWake/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/ForceWake/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/ForceWake/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/ForceWake/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="ForceWake"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp -f "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=y to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/ForceWake/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/UseAtiROM/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/UseAtiROM/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/UseAtiROM/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="UseAtiROM"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/UseAtiROM/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/UseAtiROM/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/UseAtiROM/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/UseAtiROM/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="UseAtiROM"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/UseAtiROM/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/QuietBoot/Yes/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/QuietBoot/Yes/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/QuietBoot/Yes/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="QuietBoot"
+string="Yes"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/QuietBoot/Yes/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/QuietBoot/No/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/QuietBoot/No/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/QuietBoot/No/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="QuietBoot"
+string="No"
+
+main ()
+{
+
+ bootplist="${2}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/QuietBoot/No/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/arch/32-Bit/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/arch/32-Bit/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/arch/32-Bit/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="arch"
+string="i386"
+
+main ()
+{
+
+ bootplist="${3}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/arch/32-Bit/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/Scripts/OptionsTEST/arch/64-Bit/postinstall
===================================================================
--- trunk/PackageBuilder/package/Scripts/OptionsTEST/arch/64-Bit/postinstall (revision 0)
+++ trunk/PackageBuilder/package/Scripts/OptionsTEST/arch/64-Bit/postinstall (revision 340)
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# set com.apple.Boot.plist options
+
+overide="arch"
+string="x86"
+
+main ()
+{
+
+ bootplist="${3}/.Chameleon/Extra/com.apple.Boot.plist"
+ systemplist="/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
+
+ bootoptionshdextra[1]="${overide}"
+ bootoptionshdextra[2]="${string}"
+
+ [ ! -d "${bootplist%/*}" ] && mkdir -p "${bootplist%/*}"
+
+ if [ ! -f "${bootplist}" ]; then
+ if [ -f "${systemplist}" ]; then
+ cp "${systemplist}" "${bootplist}"
+ fi
+ fi
+
+ xmlvalue=$( getxmlvalue ${overide} "${bootplist}" | tr "[:upper:]" "[:lower:]" )
+
+ case "${xmlvalue:0:1}" in
+
+ y) echo "${overide}=y already set in ${bootplist} skipping."
+ ;;
+
+ n) echo "${overide}=n is set in ${bootplist} leaving."
+ ;;
+
+ *) echo "Adding ${overide}=${string} to ${bootplist}"
+ array=("${bootoptionshdextra[@]}")
+ searchfilereplaceline "${bootplist}" "Kernel Flags" "" "" "2"
+ ;;
+ esac
+
+ chown "${USER}:20" "${bootplist}"
+}
+
+getxmlvalue ()
+{
+# 1 xml key
+# 2 xml file
+if [ -f "${2}" ]; then
+ local value
+ while read value; do
+ if [ ! "${value}" = "${value/${1}/}" ]; then
+ read value
+ value="${value#*<}" ; value="<${value}" ; value="${value#*>}" ; value="${value# *}" ; value="${value%%<*}"
+ echo "$value"
+ break
+ fi
+ done < "${2}"
+fi
+}
+
+searchfilereplaceline ()
+{
+
+mv "${1}" "${1}.orig"
+
+prefunctionifs="${IFS}"
+
+unset fileinput
+unset fileoutput
+unset find
+unset replace
+unset deletelines
+unset deletelinesskip
+unset insertlinesskip
+
+fileinput="${1}.orig"
+fileoutput="${1}"
+find="${2}"
+replace="${3}"
+deletelines="${4%,*}"
+insertlinesskip="${5}"
+
+matchlinefound="0"
+
+if [ "${#4}" = "${4#*,}" ]; then
+ deletelinesskip="0"
+ else
+ deletelinesskip="${4#*,}"
+fi
+
+IFS="\n"
+while read line
+do
+ {
+ if [ ! "${line}" = "${line/${find}/}" ]; then
+ {
+ # Trim the longest match from the end for <*
+ xmlelementindent="${line%%<*}"
+
+ # Trim the longest match from the start for *<
+ xmlelementtemp="${line#*<}"
+ # Add back in stripped <
+ xmlelement="<${xmlelementtemp}"
+
+ # Trim the shortest match from the start for <
+ xmltagtemp="${xmlelement#<}"
+ # Trim the longest match from the end for >*
+ xmltag="${xmltagtemp%%>*}"
+
+ # Trim the shortest match from the start for *>
+ xmltexttemp="${xmlelement#*>}"
+ # Trim the longest match from the end for <*
+ xmltext="${xmltexttemp%%<*}"
+
+ if [ "${replace}" ]; then
+ {
+ echo "${xmlelementindent}<${xmltag}>${replace}${xmltag}>" >>"${fileoutput}"
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+ matchlinefound="1"
+
+ }
+ else
+ {
+
+ if [ "${insertlinesskip}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -le "${insertlinesskip}" ]; then
+ {
+ if [ "${matchlinefound}" = "${insertlinesskip}" ]; then
+ {
+ arraysize=0
+ while [ ${arraysize} -lt ${#array[@]} ];
+ do
+ echo "${xmlelementindent}${array[${arraysize}]}" >>"${fileoutput}"
+ let arraysize="${arraysize}+1"
+ done
+ }
+ fi
+ }
+ fi
+
+ if [ "${deletelines}" ] && [ "${matchlinefound}" -gt 0 ] && [ "${matchlinefound}" -lt $((${deletelines}+${deletelinesskip})) ] && [ "${matchlinefound}" -ge ${deletelinesskip} ]; then
+ {
+ :
+ }
+ else
+ {
+ echo "${line}" >>"${fileoutput}"
+ }
+ fi
+
+ if [ "${matchlinefound}" -gt 0 ]; then
+ let matchlinefound="${matchlinefound}+1"
+ fi
+
+ }
+ fi
+ }
+done < "${fileinput}"
+
+IFS=${prefunctionifs}
+
+rm -f "${fileinput}"
+}
+
+main "${1}" "${2}" "${3}" "${4}"
Property changes on: trunk/PackageBuilder/package/Scripts/OptionsTEST/arch/64-Bit/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/PackageBuilder/package/fdisk440
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/fdisk440
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Resources/Hebrew.lproj/Description.html
===================================================================
--- trunk/PackageBuilder/package/Resources/Hebrew.lproj/Description.html (revision 0)
+++ trunk/PackageBuilder/package/Resources/Hebrew.lproj/Description.html (revision 340)
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+חמליאון זה שילוב של רכיבי בוטלודרים שונים.
הוא מבוסס על יישום fake EFI של David Elliott לפרויקט boot-132 של אפל.
חמליאון מגיע עם תכונות עיקריות הבאות:
+
+תכונות חדשות בחמליאון גרסה 2.0
+
+ - ממשק משתמש בעל התאמה אישית מלאה שמביאה צבעים לDarwin Bootloader.
+ - התחול דיסק התקנת OSX ריטייל על ידי העלאת ramdisk בלי להיעזר בתכנות נוספות.
+ - היברנציה. ליהנות מחזרת המערכת שלך ממצב היברנציה בעזרת preview image.
+ - עקיפת SMBIOS לשינוי ערכי מפעל של נתוני SMBIOS.
+ - עקיפת DSDT לשימוש בDSDT בהתאמה אישית אשר יכול לפתור מספר בעיות.
+
+ - אינג'קשן של Device Property באמצעות device-properties string.
+ - היבריד של boot0/boot1h לכוננים המחולקים בשיטות MBR ו GPT.
+ - קוד זיהוי אוטומטי של FSB אפילו למעבדי AMD החדשים.
+ - תמיכה בApple Software RAID.
+
+לקבלת מידע נוסף, אנא בקרו ב: http://chameleon.osx86.hu
+
+
Index: trunk/PackageBuilder/package/Resources/Hebrew.lproj/Localizable.strings
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Resources/Hebrew.lproj/Localizable.strings
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Resources/Hebrew.lproj/Welcome.rtfd/TXT.rtf
===================================================================
--- trunk/PackageBuilder/package/Resources/Hebrew.lproj/Welcome.rtfd/TXT.rtf (revision 0)
+++ trunk/PackageBuilder/package/Resources/Hebrew.lproj/Welcome.rtfd/TXT.rtf (revision 340)
@@ -0,0 +1,39 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf290
+{\fonttbl\f0\fnil\fcharset0 LucidaGrande;\f1\froman\fcharset0 TimesNewRomanPSMT;}
+{\colortbl;\red255\green255\blue255;\red65\green78\blue255;}
+\margl1440\margr1440\vieww9580\viewh11200\viewkind0
+\deftab1134
+\pard\pardeftab1134\qc\rtlpar
+
+\f0\b\fs72 \cf0 Chameleon\
+\pard\pardeftab1134\qc\rtlpar
+
+\fs26 \cf0 v%CHAMELEONVERSION% r%CHAMELEONREVISION%\
+\pard\pardeftab1134\qc\rtlpar
+
+\fs50 \cf0 \
+\pard\pardeftab1134\qc\rtlpar
+\cf2 %CHAMELEONSTAGE%\
+\pard\pardeftab1134\ql\qnatural\rtlpar
+
+\fs26 \cf0 \
+\pard\pardeftab1134\qr\rtlpar
+\cf0 \uc0\u1502 \u1508 \u1514 \u1495 \u1497 \u1501 : Crazor ,Dense ,fassl ,fxtentacle ,iNDi ,JrCs ,Kabyl ,kaitek ,mackerintel mercurysquad ,mozodojo ,munky ,rekursor ,Turbo & zef\
+\pard\pardeftab1134\qr\rtlpar
+
+\f1\b0\fs24 \cf0 \
+\
+\
+\pard\pardeftab1134\qr\rtlpar
+
+\f0\b\fs26 \cf0 \uc0\u1514 \u1493 \u1491 \u1492 \u1500 : asereBLN ,bumby ,cosmolt ,dfe ,Galaxy ,kalyway ,Krazubu ,netkas ,sckevyn ,smith@@ ,THeKiNG ,XyZ ,blackosx
+\f1\b0\fs24 \
+\
+\pard\tx360\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab1134\qr\rtlpar
+
+\f0\fs30 \cf0 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab1134\qr\rtlpar
+
+\fs26 \cf0 Copyright \'a9 2010
+\f1\fs24 \
+}
\ No newline at end of file
Index: trunk/PackageBuilder/package/Resources/Hebrew.lproj/Conclusion.rtfd/TXT.rtf
===================================================================
--- trunk/PackageBuilder/package/Resources/Hebrew.lproj/Conclusion.rtfd/TXT.rtf (revision 0)
+++ trunk/PackageBuilder/package/Resources/Hebrew.lproj/Conclusion.rtfd/TXT.rtf (revision 340)
@@ -0,0 +1,41 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf290
+{\fonttbl\f0\fnil\fcharset0 LucidaGrande;\f1\froman\fcharset0 TimesNewRomanPSMT;}
+{\colortbl;\red255\green255\blue255;\red65\green78\blue255;\red255\green0\blue0;\red0\green0\blue128;
+}
+\margl1440\margr1440\vieww11660\viewh12980\viewkind0
+\deftab1134
+\pard\pardeftab1134\qc\rtlpar
+
+\f0\b\fs72 \cf0 Chameleon\
+\pard\pardeftab1134\qc\rtlpar
+
+\fs26 \cf0 v%CHAMELEONVERSION% r%CHAMELEONREVISION%\
+\pard\pardeftab1134\qc\rtlpar
+
+\fs50 \cf0 \
+\pard\pardeftab1134\qc\rtlpar
+\cf2 %CHAMELEONSTAGE%\
+\pard\pardeftab1134\ql\qnatural\rtlpar
+
+\fs26 \cf0 \
+\pard\pardeftab1134\qc\rtlpar
+
+\fs50 \cf3 \uc0\u1492 \u1492 \u1514 \u1511 \u1504 \u1492 \u1492 \u1505 \u1514 \u1497 \u1497 \u1502 \u1492 !\
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab1134\ql\qnatural\rtlpar
+
+\b0\fs18 \cf0 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab1134\rtlpar
+{\field{\*\fldinst{HYPERLINK "http://chameleon.osx86.hu/"}}{\fldrslt
+\f1\fs24 \cf4 \ul \ulc0 http://chameleon.osx86.hu}}
+\f1\fs24 /\
+\pard\pardeftab1134\rtlpar
+{\field{\*\fldinst{HYPERLINK "http://forum.voodooprojects.org/index.php"}}{\fldrslt
+\f0 \cf4 \ul \ulc0 http://forum.voodooprojects.org/index.php}}\
+\pard\tx360\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab1134\rtlpar
+
+\f0\fs30 \cf0 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab1134\rtlpar
+
+\fs26 \cf0 Copyright \'a9 2010
+\f1\fs24 \
+}
\ No newline at end of file
Index: trunk/PackageBuilder/package/Resources/Hebrew.lproj/License.rtf
===================================================================
--- trunk/PackageBuilder/package/Resources/Hebrew.lproj/License.rtf (revision 0)
+++ trunk/PackageBuilder/package/Resources/Hebrew.lproj/License.rtf (revision 340)
@@ -0,0 +1,350 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
+{\fonttbl\f0\fmodern\fcharset0 Courier-Bold;\f1\fmodern\fcharset0 Courier;}
+{\colortbl;\red255\green255\blue255;}
+\paperw12240\paperh15840\vieww22060\viewh18360\viewkind0
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\f0\b\fs40 \cf0 APPLE PUBLIC SOURCE LICENSE \
+
+\fs26 Version 2.0 - August 6, 2003\
+\
+
+\f1\b0 Please read this License carefully before downloading this software. By downloading or using this software, you are agreeing to be bound by the terms of this License. If you do not or cannot agree to the terms of this License, please do not download or use the software.\
+\
+1. General; Definitions. This License applies to any program or other work which Apple Computer, Inc. ("Apple") makes publicly available and which contains a notice placed by Apple identifying such program or work as "Original Code" and stating that it is subject to the terms of this Apple Public Source License version 2.0 ("License"). As used in this License:\
+\
+1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to Apple and (ii) that cover subject matter contained in the Original Code, but only to the extent necessary to use, reproduce and/or distribute the Original Code without infringement; and (b) in the case where You are the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to You and (ii) that cover subject matter in Your Modifications, taken alone or in combination with Original Code.\
+\
+1.2 "Contributor" means any person or entity that creates or contributes to the creation of Modifications.\
+\
+1.3 "Covered Code" means the Original Code, Modifications, the combination of Original Code and any Modifications, and/or any respective portions thereof.\
+\
+1.4 "Externally Deploy" means: (a) to sublicense, distribute or otherwise make Covered Code available, directly or indirectly, to anyone other than You; and/or (b) to use Covered Code, alone or as part of a Larger Work, in any way to provide a service, including but not limited to delivery of content, through electronic communication with a client other than You.\
+\
+1.5 "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License.\
+\
+1.6 "Modifications" mean any addition to, deletion from, and/or change\
+to, the substance and/or structure of the Original Code, any previous\
+Modifications, the combination of Original Code and any previous\
+Modifications, and/or any respective portions thereof. When code is\
+released as a series of files, a Modification is: (a) any addition to\
+or deletion from the contents of a file containing Covered Code;\
+and/or (b) any new file or other representation of computer program\
+statements that contains any part of Covered Code.\
+\
+1.7 "Original Code" means (a) the Source Code of a program or other\
+work as originally made available by Apple under this License,\
+including the Source Code of any updates or upgrades to such programs\
+or works made available by Apple under this License, and that has been\
+expressly identified by Apple as such in the header file(s) of such\
+work; and (b) the object code compiled from such Source Code and\
+originally made available by Apple under this License.\
+\
+1.8 "Source Code" means the human readable form of a program or other\
+work that is suitable for making modifications to it, including all\
+modules it contains, plus any associated interface definition files,\
+scripts used to control compilation and installation of an executable\
+(object code).\
+\
+1.9 "You" or "Your" means an individual or a legal entity exercising\
+rights under this License. For legal entities, "You" or "Your"\
+includes any entity which controls, is controlled by, or is under\
+common control with, You, where "control" means (a) the power, direct\
+or indirect, to cause the direction or management of such entity,\
+whether by contract or otherwise, or (b) ownership of fifty percent\
+(50%) or more of the outstanding shares or beneficial ownership of\
+such entity.\
+\
+2. Permitted Uses; Conditions & Restrictions. Subject to the terms\
+and conditions of this License, Apple hereby grants You, effective on\
+the date You accept this License and download the Original Code, a\
+world-wide, royalty-free, non-exclusive license, to the extent of\
+Apple's Applicable Patent Rights and copyrights covering the Original\
+Code, to do the following:\
+\
+2.1 Unmodified Code. You may use, reproduce, display, perform,\
+internally distribute within Your organization, and Externally Deploy\
+verbatim, unmodified copies of the Original Code, for commercial or\
+non-commercial purposes, provided that in each instance:\
+\
+(a) You must retain and reproduce in all copies of Original Code the\
+copyright and other proprietary notices and disclaimers of Apple as\
+they appear in the Original Code, and keep intact all notices in the\
+Original Code that refer to this License; and\
+\
+(b) You must include a copy of this License with every copy of Source\
+Code of Covered Code and documentation You distribute or Externally\
+Deploy, and You may not offer or impose any terms on such Source Code\
+that alter or restrict this License or the recipients' rights\
+hereunder, except as permitted under Section 6.\
+\
+2.2 Modified Code. You may modify Covered Code and use, reproduce,\
+display, perform, internally distribute within Your organization, and\
+Externally Deploy Your Modifications and Covered Code, for commercial\
+or non-commercial purposes, provided that in each instance You also\
+meet all of these conditions:\
+\
+(a) You must satisfy all the conditions of Section 2.1 with respect to\
+the Source Code of the Covered Code;\
+\
+(b) You must duplicate, to the extent it does not already exist, the\
+notice in Exhibit A in each file of the Source Code of all Your\
+Modifications, and cause the modified files to carry prominent notices\
+stating that You changed the files and the date of any change; and\
+\
+(c) If You Externally Deploy Your Modifications, You must make\
+Source Code of all Your Externally Deployed Modifications either\
+available to those to whom You have Externally Deployed Your\
+Modifications, or publicly available. Source Code of Your Externally\
+Deployed Modifications must be released under the terms set forth in\
+this License, including the license grants set forth in Section 3\
+below, for as long as you Externally Deploy the Covered Code or twelve\
+(12) months from the date of initial External Deployment, whichever is\
+longer. You should preferably distribute the Source Code of Your\
+Externally Deployed Modifications electronically (e.g. download from a\
+web site).\
+\
+2.3 Distribution of Executable Versions. In addition, if You\
+Externally Deploy Covered Code (Original Code and/or Modifications) in\
+object code, executable form only, You must include a prominent\
+notice, in the code itself as well as in related documentation,\
+stating that Source Code of the Covered Code is available under the\
+terms of this License with information on how and where to obtain such\
+Source Code.\
+\
+2.4 Third Party Rights. You expressly acknowledge and agree that\
+although Apple and each Contributor grants the licenses to their\
+respective portions of the Covered Code set forth herein, no\
+assurances are provided by Apple or any Contributor that the Covered\
+Code does not infringe the patent or other intellectual property\
+rights of any other entity. Apple and each Contributor disclaim any\
+liability to You for claims brought by any other entity based on\
+infringement of intellectual property rights or otherwise. As a\
+condition to exercising the rights and licenses granted hereunder, You\
+hereby assume sole responsibility to secure any other intellectual\
+property rights needed, if any. For example, if a third party patent\
+license is required to allow You to distribute the Covered Code, it is\
+Your responsibility to acquire that license before distributing the\
+Covered Code.\
+\
+3. Your Grants. In consideration of, and as a condition to, the\
+licenses granted to You under this License, You hereby grant to any\
+person or entity receiving or distributing Covered Code under this\
+License a non-exclusive, royalty-free, perpetual, irrevocable license,\
+under Your Applicable Patent Rights and other intellectual property\
+rights (other than patent) owned or controlled by You, to use,\
+reproduce, display, perform, modify, sublicense, distribute and\
+Externally Deploy Your Modifications of the same scope and extent as\
+Apple's licenses under Sections 2.1 and 2.2 above.\
+\
+4. Larger Works. You may create a Larger Work by combining Covered\
+Code with other code not governed by the terms of this License and\
+distribute the Larger Work as a single product. In each such instance,\
+You must make sure the requirements of this License are fulfilled for\
+the Covered Code or any portion thereof.\
+\
+5. Limitations on Patent License. Except as expressly stated in\
+Section 2, no other patent rights, express or implied, are granted by\
+Apple herein. Modifications and/or Larger Works may require additional\
+patent licenses from Apple which Apple may grant in its sole\
+discretion.\
+\
+6. Additional Terms. You may choose to offer, and to charge a fee for,\
+warranty, support, indemnity or liability obligations and/or other\
+rights consistent with the scope of the license granted herein\
+("Additional Terms") to one or more recipients of Covered Code.\
+However, You may do so only on Your own behalf and as Your sole\
+responsibility, and not on behalf of Apple or any Contributor. You\
+must obtain the recipient's agreement that any such Additional Terms\
+are offered by You alone, and You hereby agree to indemnify, defend\
+and hold Apple and every Contributor harmless for any liability\
+incurred by or claims asserted against Apple or such Contributor by\
+reason of any such Additional Terms.\
+\
+7. Versions of the License. Apple may publish revised and/or new\
+versions of this License from time to time. Each version will be given\
+a distinguishing version number. Once Original Code has been published\
+under a particular version of this License, You may continue to use it\
+under the terms of that version. You may also choose to use such\
+Original Code under the terms of any subsequent version of this\
+License published by Apple. No one other than Apple has the right to\
+modify the terms applicable to Covered Code created under this\
+License.\
+\
+8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in\
+part pre-release, untested, or not fully tested works. The Covered\
+Code may contain errors that could cause failures or loss of data, and\
+may be incomplete or contain inaccuracies. You expressly acknowledge\
+and agree that use of the Covered Code, or any portion thereof, is at\
+Your sole and entire risk. THE COVERED CODE IS PROVIDED "AS IS" AND\
+WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND\
+APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" FOR THE\
+PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM\
+ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT\
+NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF\
+MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR\
+PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD\
+PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST\
+INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE\
+FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS,\
+THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR\
+ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO\
+ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE\
+AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY.\
+You acknowledge that the Covered Code is not intended for use in the\
+operation of nuclear facilities, aircraft navigation, communication\
+systems, or air traffic control machines in which case the failure of\
+the Covered Code could lead to death, personal injury, or severe\
+physical or environmental damage.\
+\
+9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO\
+EVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL,\
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING\
+TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR\
+ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY,\
+TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF\
+APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\
+DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY\
+REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF\
+INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY\
+TO YOU. In no event shall Apple's total liability to You for all\
+damages (other than as may be required by applicable law) under this\
+License exceed the amount of fifty dollars ($50.00).\
+\
+10. Trademarks. This License does not grant any rights to use the\
+trademarks or trade names "Apple", "Apple Computer", "Mac", "Mac OS",\
+"QuickTime", "QuickTime Streaming Server" or any other trademarks,\
+service marks, logos or trade names belonging to Apple (collectively\
+"Apple Marks") or to any trademark, service mark, logo or trade name\
+belonging to any Contributor. You agree not to use any Apple Marks in\
+or as part of the name of products derived from the Original Code or\
+to endorse or promote products derived from the Original Code other\
+than as expressly permitted by and in strict compliance at all times\
+with Apple's third party trademark usage guidelines which are posted\
+at http://www.apple.com/legal/guidelinesfor3rdparties.html.\
+\
+11. Ownership. Subject to the licenses granted under this License,\
+each Contributor retains all rights, title and interest in and to any\
+Modifications made by such Contributor. Apple retains all rights,\
+title and interest in and to the Original Code and any Modifications\
+made by or on behalf of Apple ("Apple Modifications"), and such Apple\
+Modifications will not be automatically subject to this License. Apple\
+may, at its sole discretion, choose to license such Apple\
+Modifications under this License, or on different terms from those\
+contained in this License or may choose not to license them at all.\
+\
+12. Termination.\
+\
+12.1 Termination. This License and the rights granted hereunder will\
+terminate:\
+\
+(a) automatically without notice from Apple if You fail to comply with\
+any term(s) of this License and fail to cure such breach within 30\
+days of becoming aware of such breach;\
+\
+(b) immediately in the event of the circumstances described in Section\
+13.5(b); or\
+\
+(c) automatically without notice from Apple if You, at any time during\
+the term of this License, commence an action for patent infringement\
+against Apple; provided that Apple did not first commence\
+an action for patent infringement against You in that instance.\
+\
+12.2 Effect of Termination. Upon termination, You agree to immediately\
+stop any further use, reproduction, modification, sublicensing and\
+distribution of the Covered Code. All sublicenses to the Covered Code\
+which have been properly granted prior to termination shall survive\
+any termination of this License. Provisions which, by their nature,\
+should remain in effect beyond the termination of this License shall\
+survive, including but not limited to Sections 3, 5, 8, 9, 10, 11,\
+12.2 and 13. No party will be liable to any other for compensation,\
+indemnity or damages of any sort solely as a result of terminating\
+this License in accordance with its terms, and termination of this\
+License will be without prejudice to any other right or remedy of\
+any party.\
+\
+13. Miscellaneous.\
+\
+13.1 Government End Users. The Covered Code is a "commercial item" as\
+defined in FAR 2.101. Government software and technical data rights in\
+the Covered Code include only those rights customarily provided to the\
+public as defined in this License. This customary commercial license\
+in technical data and software is provided in accordance with FAR\
+12.211 (Technical Data) and 12.212 (Computer Software) and, for\
+Department of Defense purchases, DFAR 252.227-7015 (Technical Data --\
+Commercial Items) and 227.7202-3 (Rights in Commercial Computer\
+Software or Computer Software Documentation). Accordingly, all U.S.\
+Government End Users acquire Covered Code with only those rights set\
+forth herein.\
+\
+13.2 Relationship of Parties. This License will not be construed as\
+creating an agency, partnership, joint venture or any other form of\
+legal association between or among You, Apple or any Contributor, and\
+You will not represent to the contrary, whether expressly, by\
+implication, appearance or otherwise.\
+\
+13.3 Independent Development. Nothing in this License will impair\
+Apple's right to acquire, license, develop, have others develop for\
+it, market and/or distribute technology or products that perform the\
+same or similar functions as, or otherwise compete with,\
+Modifications, Larger Works, technology or products that You may\
+develop, produce, market or distribute.\
+\
+13.4 Waiver; Construction. Failure by Apple or any Contributor to\
+enforce any provision of this License will not be deemed a waiver of\
+future enforcement of that or any other provision. Any law or\
+regulation which provides that the language of a contract shall be\
+construed against the drafter will not apply to this License.\
+\
+13.5 Severability. (a) If for any reason a court of competent\
+jurisdiction finds any provision of this License, or portion thereof,\
+to be unenforceable, that provision of the License will be enforced to\
+the maximum extent permissible so as to effect the economic benefits\
+and intent of the parties, and the remainder of this License will\
+continue in full force and effect. (b) Notwithstanding the foregoing,\
+if applicable law prohibits or restricts You from fully and/or\
+specifically complying with Sections 2 and/or 3 or prevents the\
+enforceability of either of those Sections, this License will\
+immediately terminate and You must immediately discontinue any use of\
+the Covered Code and destroy all copies of it that are in your\
+possession or control.\
+\
+13.6 Dispute Resolution. Any litigation or other dispute resolution\
+between You and Apple relating to this License shall take place in the\
+Northern District of California, and You and Apple hereby consent to\
+the personal jurisdiction of, and venue in, the state and federal\
+courts within that District with respect to this License. The\
+application of the United Nations Convention on Contracts for the\
+International Sale of Goods is expressly excluded.\
+\
+13.7 Entire Agreement; Governing Law. This License constitutes the\
+entire agreement between the parties with respect to the subject\
+matter hereof. This License shall be governed by the laws of the\
+United States and the State of California, except that body of\
+California law concerning conflicts of law.\
+\
+Where You are located in the province of Quebec, Canada, the following\
+clause applies: The parties hereby confirm that they have requested\
+that this License and all related documents be drafted in English. Les\
+parties ont exige que le present contrat et tous les documents\
+connexes soient rediges en anglais.\
+\
+EXHIBIT A.\
+\
+"Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights\
+Reserved.\
+\
+This file contains Original Code and/or Modifications of Original Code\
+as defined in and that are subject to the Apple Public Source License\
+Version 2.0 (the 'License'). You may not use this file except in\
+compliance with the License. Please obtain a copy of the License at\
+http://www.opensource.apple.com/apsl/ and read it before using this\
+file.\
+\
+The Original Code and all software distributed under the License are\
+distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\
+EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\
+INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\
+FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\
+Please see the License for the specific language governing rights and\
+limitations under the License." }
\ No newline at end of file
Index: trunk/PackageBuilder/package/Resources/Polish.lproj/Description.html
===================================================================
--- trunk/PackageBuilder/package/Resources/Polish.lproj/Description.html (revision 0)
+++ trunk/PackageBuilder/package/Resources/Polish.lproj/Description.html (revision 340)
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+Chameleon jest połączeniem różnych komponentów boot loadera.
Jest oparty na implementacji fake EFI Davida Elliotta dodanej do projektu boot-132 Apple'a.
Chameleon jest rozszerzony o następujące funkcje:
+
+Nowe funkcje w Chameleonie 2.0
+
+ - Całkowicie konfigurowalne GUI by dodać trochę koloru do Bootloadera Darwin.
+ - Uruchamianie płyt Retail DVD przez bezpośrednie ładowanie obrazu ramdisk bez pomocy dodatkowych programów.
+ - Hiberacja. Ciesz się przywracaniem Twojego systemu Mac OS X z obrazu podglądu.
+ - Zastąpienie SMBIOS by zmodyfikować fabryczne wartości SMBIOSu.
+ - Zastąpienie DSDT by móc używać zmodyfikowanego, poprawionego DSDT, który może rozwiązać parę problemów.
+
+ - Wstrzykiwanie ustawień urządzeń (Device Property Injection) przez łańcuch device-properties.
+ - Hybrydowe boot0 / boot1h dla dysków w ukłądzie partycji MBR i GPT.
+ - Automatyczne wykrywanie FSB nawet dla najnowszych procesorów AMD.
+ - Obsługa Apple Software RAID.
+
+By uzyskać bardziej dokładne informacje, odwiedź: http://chameleon.osx86.hu
+
+
Index: trunk/PackageBuilder/package/Resources/Polish.lproj/Localizable.strings
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Resources/Polish.lproj/Localizable.strings
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Resources/Polish.lproj/Welcome.rtfd/TXT.rtf
===================================================================
--- trunk/PackageBuilder/package/Resources/Polish.lproj/Welcome.rtfd/TXT.rtf (revision 0)
+++ trunk/PackageBuilder/package/Resources/Polish.lproj/Welcome.rtfd/TXT.rtf (revision 340)
@@ -0,0 +1,26 @@
+{\rtf1\ansi\ansicpg1250\cocoartf1038\cocoasubrtf320
+{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
+{\colortbl;\red255\green255\blue255;\red65\green78\blue255;}
+\margl1440\margr1440\vieww11660\viewh12980\viewkind0
+\pard\ri0\qc
+
+\f0\b\fs72 \cf0 Chameleon
+\fs50 \
+
+\fs26 v%CHAMELEONVERSION% r%CHAMELEONREVISION%
+\fs50 \
+\
+\cf2 %CHAMELEONSTAGE%
+\fs26 \cf0 \
+\pard\ri0\ql\qnatural
+\cf0 \
+Developerzy: Crazor, Dense, fassl, fxtentacle, iNDi, JrCs, Kabyl, kaitek, mackerintel, mercurysquad, mozodojo, munky, rekursor, Turbo & zef \
+\
+\
+Podzi\uc0\u281 kowania dla: asereBLN, bumby, cosmolt, dfe, Galaxy, kalyway, Krazubu, netkas, sckevyn, smith@@, THeKiNG, XyZ, blackosx\
+\pard\tx360\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
+
+\b0\fs30 \cf0 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\fs26 \cf0 Copyright \'a9 2010}
\ No newline at end of file
Index: trunk/PackageBuilder/package/Resources/Polish.lproj/Conclusion.rtfd/TXT.rtf
===================================================================
--- trunk/PackageBuilder/package/Resources/Polish.lproj/Conclusion.rtfd/TXT.rtf (revision 0)
+++ trunk/PackageBuilder/package/Resources/Polish.lproj/Conclusion.rtfd/TXT.rtf (revision 340)
@@ -0,0 +1,34 @@
+{\rtf1\ansi\ansicpg1250\cocoartf1038\cocoasubrtf320
+{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
+{\colortbl;\red255\green255\blue255;\red65\green78\blue255;\red255\green0\blue0;}
+\margl1440\margr1440\vieww11660\viewh12980\viewkind0
+\pard\ri0\qc
+
+\f0\b\fs72 \cf0 Chameleon
+\fs50 \
+
+\fs26 v%CHAMELEONVERSION% r%CHAMELEONREVISION%
+\fs50 \
+\
+\cf2 %CHAMELEONSTAGE%\cf0 \
+\pard\ri0\ql\qnatural
+
+\fs26 \cf0 \
+\pard\ri0\qc
+
+\fs50 \cf3 Instalacja zako\uc0\u324 czona!
+\b0\fs26 \cf0 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\fs18 \cf0 \
+{\field{\*\fldinst{HYPERLINK "http://chameleon.osx86.hu/"}}{\fldrslt
+\fs26 http://chameleon.osx86.hu/}}
+\fs26 \
+{\field{\*\fldinst{HYPERLINK "http://forum.voodooprojects.org/index.php"}}{\fldrslt http://forum.voodooprojects.org/index.php}}
+\b \
+\pard\tx360\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
+
+\b0\fs30 \cf0 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\fs26 \cf0 Copyright \'a9 2010}
\ No newline at end of file
Index: trunk/PackageBuilder/package/Resources/Polish.lproj/License.rtf
===================================================================
--- trunk/PackageBuilder/package/Resources/Polish.lproj/License.rtf (revision 0)
+++ trunk/PackageBuilder/package/Resources/Polish.lproj/License.rtf (revision 340)
@@ -0,0 +1,350 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
+{\fonttbl\f0\fmodern\fcharset0 Courier-Bold;\f1\fmodern\fcharset0 Courier;}
+{\colortbl;\red255\green255\blue255;}
+\paperw12240\paperh15840\vieww22060\viewh18360\viewkind0
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\f0\b\fs40 \cf0 APPLE PUBLIC SOURCE LICENSE \
+
+\fs26 Version 2.0 - August 6, 2003\
+\
+
+\f1\b0 Please read this License carefully before downloading this software. By downloading or using this software, you are agreeing to be bound by the terms of this License. If you do not or cannot agree to the terms of this License, please do not download or use the software.\
+\
+1. General; Definitions. This License applies to any program or other work which Apple Computer, Inc. ("Apple") makes publicly available and which contains a notice placed by Apple identifying such program or work as "Original Code" and stating that it is subject to the terms of this Apple Public Source License version 2.0 ("License"). As used in this License:\
+\
+1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to Apple and (ii) that cover subject matter contained in the Original Code, but only to the extent necessary to use, reproduce and/or distribute the Original Code without infringement; and (b) in the case where You are the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to You and (ii) that cover subject matter in Your Modifications, taken alone or in combination with Original Code.\
+\
+1.2 "Contributor" means any person or entity that creates or contributes to the creation of Modifications.\
+\
+1.3 "Covered Code" means the Original Code, Modifications, the combination of Original Code and any Modifications, and/or any respective portions thereof.\
+\
+1.4 "Externally Deploy" means: (a) to sublicense, distribute or otherwise make Covered Code available, directly or indirectly, to anyone other than You; and/or (b) to use Covered Code, alone or as part of a Larger Work, in any way to provide a service, including but not limited to delivery of content, through electronic communication with a client other than You.\
+\
+1.5 "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License.\
+\
+1.6 "Modifications" mean any addition to, deletion from, and/or change\
+to, the substance and/or structure of the Original Code, any previous\
+Modifications, the combination of Original Code and any previous\
+Modifications, and/or any respective portions thereof. When code is\
+released as a series of files, a Modification is: (a) any addition to\
+or deletion from the contents of a file containing Covered Code;\
+and/or (b) any new file or other representation of computer program\
+statements that contains any part of Covered Code.\
+\
+1.7 "Original Code" means (a) the Source Code of a program or other\
+work as originally made available by Apple under this License,\
+including the Source Code of any updates or upgrades to such programs\
+or works made available by Apple under this License, and that has been\
+expressly identified by Apple as such in the header file(s) of such\
+work; and (b) the object code compiled from such Source Code and\
+originally made available by Apple under this License.\
+\
+1.8 "Source Code" means the human readable form of a program or other\
+work that is suitable for making modifications to it, including all\
+modules it contains, plus any associated interface definition files,\
+scripts used to control compilation and installation of an executable\
+(object code).\
+\
+1.9 "You" or "Your" means an individual or a legal entity exercising\
+rights under this License. For legal entities, "You" or "Your"\
+includes any entity which controls, is controlled by, or is under\
+common control with, You, where "control" means (a) the power, direct\
+or indirect, to cause the direction or management of such entity,\
+whether by contract or otherwise, or (b) ownership of fifty percent\
+(50%) or more of the outstanding shares or beneficial ownership of\
+such entity.\
+\
+2. Permitted Uses; Conditions & Restrictions. Subject to the terms\
+and conditions of this License, Apple hereby grants You, effective on\
+the date You accept this License and download the Original Code, a\
+world-wide, royalty-free, non-exclusive license, to the extent of\
+Apple's Applicable Patent Rights and copyrights covering the Original\
+Code, to do the following:\
+\
+2.1 Unmodified Code. You may use, reproduce, display, perform,\
+internally distribute within Your organization, and Externally Deploy\
+verbatim, unmodified copies of the Original Code, for commercial or\
+non-commercial purposes, provided that in each instance:\
+\
+(a) You must retain and reproduce in all copies of Original Code the\
+copyright and other proprietary notices and disclaimers of Apple as\
+they appear in the Original Code, and keep intact all notices in the\
+Original Code that refer to this License; and\
+\
+(b) You must include a copy of this License with every copy of Source\
+Code of Covered Code and documentation You distribute or Externally\
+Deploy, and You may not offer or impose any terms on such Source Code\
+that alter or restrict this License or the recipients' rights\
+hereunder, except as permitted under Section 6.\
+\
+2.2 Modified Code. You may modify Covered Code and use, reproduce,\
+display, perform, internally distribute within Your organization, and\
+Externally Deploy Your Modifications and Covered Code, for commercial\
+or non-commercial purposes, provided that in each instance You also\
+meet all of these conditions:\
+\
+(a) You must satisfy all the conditions of Section 2.1 with respect to\
+the Source Code of the Covered Code;\
+\
+(b) You must duplicate, to the extent it does not already exist, the\
+notice in Exhibit A in each file of the Source Code of all Your\
+Modifications, and cause the modified files to carry prominent notices\
+stating that You changed the files and the date of any change; and\
+\
+(c) If You Externally Deploy Your Modifications, You must make\
+Source Code of all Your Externally Deployed Modifications either\
+available to those to whom You have Externally Deployed Your\
+Modifications, or publicly available. Source Code of Your Externally\
+Deployed Modifications must be released under the terms set forth in\
+this License, including the license grants set forth in Section 3\
+below, for as long as you Externally Deploy the Covered Code or twelve\
+(12) months from the date of initial External Deployment, whichever is\
+longer. You should preferably distribute the Source Code of Your\
+Externally Deployed Modifications electronically (e.g. download from a\
+web site).\
+\
+2.3 Distribution of Executable Versions. In addition, if You\
+Externally Deploy Covered Code (Original Code and/or Modifications) in\
+object code, executable form only, You must include a prominent\
+notice, in the code itself as well as in related documentation,\
+stating that Source Code of the Covered Code is available under the\
+terms of this License with information on how and where to obtain such\
+Source Code.\
+\
+2.4 Third Party Rights. You expressly acknowledge and agree that\
+although Apple and each Contributor grants the licenses to their\
+respective portions of the Covered Code set forth herein, no\
+assurances are provided by Apple or any Contributor that the Covered\
+Code does not infringe the patent or other intellectual property\
+rights of any other entity. Apple and each Contributor disclaim any\
+liability to You for claims brought by any other entity based on\
+infringement of intellectual property rights or otherwise. As a\
+condition to exercising the rights and licenses granted hereunder, You\
+hereby assume sole responsibility to secure any other intellectual\
+property rights needed, if any. For example, if a third party patent\
+license is required to allow You to distribute the Covered Code, it is\
+Your responsibility to acquire that license before distributing the\
+Covered Code.\
+\
+3. Your Grants. In consideration of, and as a condition to, the\
+licenses granted to You under this License, You hereby grant to any\
+person or entity receiving or distributing Covered Code under this\
+License a non-exclusive, royalty-free, perpetual, irrevocable license,\
+under Your Applicable Patent Rights and other intellectual property\
+rights (other than patent) owned or controlled by You, to use,\
+reproduce, display, perform, modify, sublicense, distribute and\
+Externally Deploy Your Modifications of the same scope and extent as\
+Apple's licenses under Sections 2.1 and 2.2 above.\
+\
+4. Larger Works. You may create a Larger Work by combining Covered\
+Code with other code not governed by the terms of this License and\
+distribute the Larger Work as a single product. In each such instance,\
+You must make sure the requirements of this License are fulfilled for\
+the Covered Code or any portion thereof.\
+\
+5. Limitations on Patent License. Except as expressly stated in\
+Section 2, no other patent rights, express or implied, are granted by\
+Apple herein. Modifications and/or Larger Works may require additional\
+patent licenses from Apple which Apple may grant in its sole\
+discretion.\
+\
+6. Additional Terms. You may choose to offer, and to charge a fee for,\
+warranty, support, indemnity or liability obligations and/or other\
+rights consistent with the scope of the license granted herein\
+("Additional Terms") to one or more recipients of Covered Code.\
+However, You may do so only on Your own behalf and as Your sole\
+responsibility, and not on behalf of Apple or any Contributor. You\
+must obtain the recipient's agreement that any such Additional Terms\
+are offered by You alone, and You hereby agree to indemnify, defend\
+and hold Apple and every Contributor harmless for any liability\
+incurred by or claims asserted against Apple or such Contributor by\
+reason of any such Additional Terms.\
+\
+7. Versions of the License. Apple may publish revised and/or new\
+versions of this License from time to time. Each version will be given\
+a distinguishing version number. Once Original Code has been published\
+under a particular version of this License, You may continue to use it\
+under the terms of that version. You may also choose to use such\
+Original Code under the terms of any subsequent version of this\
+License published by Apple. No one other than Apple has the right to\
+modify the terms applicable to Covered Code created under this\
+License.\
+\
+8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in\
+part pre-release, untested, or not fully tested works. The Covered\
+Code may contain errors that could cause failures or loss of data, and\
+may be incomplete or contain inaccuracies. You expressly acknowledge\
+and agree that use of the Covered Code, or any portion thereof, is at\
+Your sole and entire risk. THE COVERED CODE IS PROVIDED "AS IS" AND\
+WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND\
+APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" FOR THE\
+PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM\
+ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT\
+NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF\
+MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR\
+PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD\
+PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST\
+INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE\
+FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS,\
+THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR\
+ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO\
+ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE\
+AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY.\
+You acknowledge that the Covered Code is not intended for use in the\
+operation of nuclear facilities, aircraft navigation, communication\
+systems, or air traffic control machines in which case the failure of\
+the Covered Code could lead to death, personal injury, or severe\
+physical or environmental damage.\
+\
+9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO\
+EVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL,\
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING\
+TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR\
+ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY,\
+TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF\
+APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\
+DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY\
+REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF\
+INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY\
+TO YOU. In no event shall Apple's total liability to You for all\
+damages (other than as may be required by applicable law) under this\
+License exceed the amount of fifty dollars ($50.00).\
+\
+10. Trademarks. This License does not grant any rights to use the\
+trademarks or trade names "Apple", "Apple Computer", "Mac", "Mac OS",\
+"QuickTime", "QuickTime Streaming Server" or any other trademarks,\
+service marks, logos or trade names belonging to Apple (collectively\
+"Apple Marks") or to any trademark, service mark, logo or trade name\
+belonging to any Contributor. You agree not to use any Apple Marks in\
+or as part of the name of products derived from the Original Code or\
+to endorse or promote products derived from the Original Code other\
+than as expressly permitted by and in strict compliance at all times\
+with Apple's third party trademark usage guidelines which are posted\
+at http://www.apple.com/legal/guidelinesfor3rdparties.html.\
+\
+11. Ownership. Subject to the licenses granted under this License,\
+each Contributor retains all rights, title and interest in and to any\
+Modifications made by such Contributor. Apple retains all rights,\
+title and interest in and to the Original Code and any Modifications\
+made by or on behalf of Apple ("Apple Modifications"), and such Apple\
+Modifications will not be automatically subject to this License. Apple\
+may, at its sole discretion, choose to license such Apple\
+Modifications under this License, or on different terms from those\
+contained in this License or may choose not to license them at all.\
+\
+12. Termination.\
+\
+12.1 Termination. This License and the rights granted hereunder will\
+terminate:\
+\
+(a) automatically without notice from Apple if You fail to comply with\
+any term(s) of this License and fail to cure such breach within 30\
+days of becoming aware of such breach;\
+\
+(b) immediately in the event of the circumstances described in Section\
+13.5(b); or\
+\
+(c) automatically without notice from Apple if You, at any time during\
+the term of this License, commence an action for patent infringement\
+against Apple; provided that Apple did not first commence\
+an action for patent infringement against You in that instance.\
+\
+12.2 Effect of Termination. Upon termination, You agree to immediately\
+stop any further use, reproduction, modification, sublicensing and\
+distribution of the Covered Code. All sublicenses to the Covered Code\
+which have been properly granted prior to termination shall survive\
+any termination of this License. Provisions which, by their nature,\
+should remain in effect beyond the termination of this License shall\
+survive, including but not limited to Sections 3, 5, 8, 9, 10, 11,\
+12.2 and 13. No party will be liable to any other for compensation,\
+indemnity or damages of any sort solely as a result of terminating\
+this License in accordance with its terms, and termination of this\
+License will be without prejudice to any other right or remedy of\
+any party.\
+\
+13. Miscellaneous.\
+\
+13.1 Government End Users. The Covered Code is a "commercial item" as\
+defined in FAR 2.101. Government software and technical data rights in\
+the Covered Code include only those rights customarily provided to the\
+public as defined in this License. This customary commercial license\
+in technical data and software is provided in accordance with FAR\
+12.211 (Technical Data) and 12.212 (Computer Software) and, for\
+Department of Defense purchases, DFAR 252.227-7015 (Technical Data --\
+Commercial Items) and 227.7202-3 (Rights in Commercial Computer\
+Software or Computer Software Documentation). Accordingly, all U.S.\
+Government End Users acquire Covered Code with only those rights set\
+forth herein.\
+\
+13.2 Relationship of Parties. This License will not be construed as\
+creating an agency, partnership, joint venture or any other form of\
+legal association between or among You, Apple or any Contributor, and\
+You will not represent to the contrary, whether expressly, by\
+implication, appearance or otherwise.\
+\
+13.3 Independent Development. Nothing in this License will impair\
+Apple's right to acquire, license, develop, have others develop for\
+it, market and/or distribute technology or products that perform the\
+same or similar functions as, or otherwise compete with,\
+Modifications, Larger Works, technology or products that You may\
+develop, produce, market or distribute.\
+\
+13.4 Waiver; Construction. Failure by Apple or any Contributor to\
+enforce any provision of this License will not be deemed a waiver of\
+future enforcement of that or any other provision. Any law or\
+regulation which provides that the language of a contract shall be\
+construed against the drafter will not apply to this License.\
+\
+13.5 Severability. (a) If for any reason a court of competent\
+jurisdiction finds any provision of this License, or portion thereof,\
+to be unenforceable, that provision of the License will be enforced to\
+the maximum extent permissible so as to effect the economic benefits\
+and intent of the parties, and the remainder of this License will\
+continue in full force and effect. (b) Notwithstanding the foregoing,\
+if applicable law prohibits or restricts You from fully and/or\
+specifically complying with Sections 2 and/or 3 or prevents the\
+enforceability of either of those Sections, this License will\
+immediately terminate and You must immediately discontinue any use of\
+the Covered Code and destroy all copies of it that are in your\
+possession or control.\
+\
+13.6 Dispute Resolution. Any litigation or other dispute resolution\
+between You and Apple relating to this License shall take place in the\
+Northern District of California, and You and Apple hereby consent to\
+the personal jurisdiction of, and venue in, the state and federal\
+courts within that District with respect to this License. The\
+application of the United Nations Convention on Contracts for the\
+International Sale of Goods is expressly excluded.\
+\
+13.7 Entire Agreement; Governing Law. This License constitutes the\
+entire agreement between the parties with respect to the subject\
+matter hereof. This License shall be governed by the laws of the\
+United States and the State of California, except that body of\
+California law concerning conflicts of law.\
+\
+Where You are located in the province of Quebec, Canada, the following\
+clause applies: The parties hereby confirm that they have requested\
+that this License and all related documents be drafted in English. Les\
+parties ont exige que le present contrat et tous les documents\
+connexes soient rediges en anglais.\
+\
+EXHIBIT A.\
+\
+"Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights\
+Reserved.\
+\
+This file contains Original Code and/or Modifications of Original Code\
+as defined in and that are subject to the Apple Public Source License\
+Version 2.0 (the 'License'). You may not use this file except in\
+compliance with the License. Please obtain a copy of the License at\
+http://www.opensource.apple.com/apsl/ and read it before using this\
+file.\
+\
+The Original Code and all software distributed under the License are\
+distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\
+EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\
+INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\
+FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\
+Please see the License for the specific language governing rights and\
+limitations under the License." }
\ No newline at end of file
Index: trunk/PackageBuilder/package/Resources/Arabic.lproj/Description.html
===================================================================
--- trunk/PackageBuilder/package/Resources/Arabic.lproj/Description.html (revision 0)
+++ trunk/PackageBuilder/package/Resources/Arabic.lproj/Description.html (revision 340)
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+الشامليون عباره عن مزيج من مختلف مكونات محمل الاقلاع٫
بنى عل ىالتطبيق Fake EFI لصاحبه David Elliott واضيف الى مشروع Apple's boot-132 ٫
تم تطوير الشامليون ليضم المميزات التالية
+
+المميزات الجديده فى الشامليون ٢٫٠
+
+
+ - واجهه قابله للتخصيص الكامل لاضافه بعض الالوان لمحمل الاقلاع Darwin ٫
+ - اقلاع الاقراص الاصلية عن طريق تحميل صوره ل ramdisk مباشرة دون الحاجه لبرامج اضافية
+ - السبات Hibernation ٫ استمتع باستئناف الماكنتوش من الحالة السابقه ٫
+ - امكانيه تعديل القيم المصنعيه ل SMBIOS باستخادم SMBIOS.plist ٫
+ - امكانيه استخدام DSDT.aml المصححة التى تسطيع حل الكثير من العيوب
+
+ - امكانيه حقن بعض المكونات لكى تعمل عن الطريق device-properties string ٫
+ - تحتوى على هجين من boot0 / boot1h من اجل الاقراص المقسمة بنظامى MBR . GPT ٫
+ - تحديد كود الناقل الامامى اوتوماتيكيا حتى مع اخر المعالجات لشركه AMD ٫
+ - دعم ل Apple Software RAID
+
+ لمزيد من المعلومات قم بزيارة موقعناhttp://chameleon.osx86.hu
+
+
Index: trunk/PackageBuilder/package/Resources/Arabic.lproj/Localizable.strings
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Resources/Arabic.lproj/Localizable.strings
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Resources/Arabic.lproj/Welcome.rtfd/TXT.rtf
===================================================================
--- trunk/PackageBuilder/package/Resources/Arabic.lproj/Welcome.rtfd/TXT.rtf (revision 0)
+++ trunk/PackageBuilder/package/Resources/Arabic.lproj/Welcome.rtfd/TXT.rtf (revision 340)
@@ -0,0 +1,37 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
+{\fonttbl\f0\fnil\fcharset178 GeezaPro;\f1\fnil\fcharset0 LucidaGrande;}
+{\colortbl;\red255\green255\blue255;\red65\green78\blue255;}
+\margl1440\margr1440\vieww11660\viewh12980\viewkind0
+\pard\ri0\qc
+
+\f0\b\fs72 \cf0 \'c7\'e1\'d4\'c7\'e3\'e1\'ed\'e6\'e4
+\f1\fs50 \
+
+\fs26 %CHAMELEONREVISION%
+\f0 \'c7\'e1\'e4\'d3\'ce\'c9
+\f1 %CHAMELEONVERSION%
+\f0 \'c7\'e1\'e3\'d1\'c7\'cc\'da\'c9
+\f1
+\fs50 \
+\cf2 %CHAMELEONSTAGE%
+\fs26 \cf0 \
+\pard\ri0\ql\qnatural
+\cf0 \
+\pard\ri0\qr
+
+\f0 \cf0 \'c7\'e1\'e3\'d8\'e6\'d1\'ed\'e4
+\f1 \uc0\u8235 :\uc0\u8236 \
+\pard\ri0\ql\qnatural
+\cf0 Crazor, Dense, fassl, fxtentacle, iNDi, JrCs, Kabyl, kaitek, mackerintel, mercurysquad, mozodojo, munky, rekursor, Turbo & zef \
+\pard\ri0\qr
+
+\f0 \cf0 \'d4\'df\'d1\'c7
+\f1
+\f0 \'e1
+\f1 \uc0\u8235 :\uc0\u8236 \
+\pard\ri0\ql\qnatural
+\cf0 asereBLN, bumby, cosmolt, dfe, Galaxy, kalyway, Krazubu, netkas, sckevyn, smith@@, THeKiNG, XyZ, blackosx
+\b0\fs30 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\fs26 \cf0 Copyright \'a9 2010}
\ No newline at end of file
Index: trunk/PackageBuilder/package/Resources/Arabic.lproj/Conclusion.rtfd/TXT.rtf
===================================================================
--- trunk/PackageBuilder/package/Resources/Arabic.lproj/Conclusion.rtfd/TXT.rtf (revision 0)
+++ trunk/PackageBuilder/package/Resources/Arabic.lproj/Conclusion.rtfd/TXT.rtf (revision 340)
@@ -0,0 +1,39 @@
+{\rtf1\ansi\ansicpg1256\cocoartf1038\cocoasubrtf320
+{\fonttbl\f0\fnil\fcharset178 GeezaPro;\f1\fnil\fcharset0 LucidaGrande;}
+{\colortbl;\red255\green255\blue255;\red65\green78\blue255;\red255\green0\blue0;}
+\margl1440\margr1440\vieww11660\viewh12980\viewkind0
+\pard\ri0\qc
+
+\f0\b\fs72 \cf0 \'c7\'e1\'d4\'c7\'e3\'e1\'ed\'e6\'e4
+\f1\fs50 \
+
+\fs26 %CHAMELEONREVISION%
+\f0 \'c7\'e1\'e4\'d3\'ce\'c9
+\f1 %CHAMELEONVERSION%
+\f0 \'c7\'e1\'e3\'d1\'c7\'cc\'da\'c9
+\f1\fs50 \
+\cf2 %CHAMELEONSTAGE%\cf0 \
+\pard\ri0\ql\qnatural
+
+\fs26 \cf0 \
+\pard\ri0\qc
+
+\f0\fs50 \cf3 \'ca\'e3
+\f1
+\f0 \'c7\'e1\'ca\'d1\'df\'ed\'c8
+\f1 \uc0\u8235 !
+\b0\fs26 \cf0 \uc0\u8236 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\fs18 \cf0 \
+{\field{\*\fldinst{HYPERLINK "http://chameleon.osx86.hu/"}}{\fldrslt
+\fs26 http://chameleon.osx86.hu/}}
+\fs26 \
+{\field{\*\fldinst{HYPERLINK "http://forum.voodooprojects.org/index.php"}}{\fldrslt http://forum.voodooprojects.org/index.php}}
+\b \
+\pard\tx360\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
+
+\b0\fs30 \cf0 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\fs26 \cf0 Copyright \'a9 2010}
\ No newline at end of file
Index: trunk/PackageBuilder/package/Resources/Arabic.lproj/License.rtf
===================================================================
--- trunk/PackageBuilder/package/Resources/Arabic.lproj/License.rtf (revision 0)
+++ trunk/PackageBuilder/package/Resources/Arabic.lproj/License.rtf (revision 340)
@@ -0,0 +1,350 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
+{\fonttbl\f0\fmodern\fcharset0 Courier-Bold;\f1\fmodern\fcharset0 Courier;}
+{\colortbl;\red255\green255\blue255;}
+\paperw12240\paperh15840\vieww22060\viewh18360\viewkind0
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\f0\b\fs40 \cf0 APPLE PUBLIC SOURCE LICENSE \
+
+\fs26 Version 2.0 - August 6, 2003\
+\
+
+\f1\b0 Please read this License carefully before downloading this software. By downloading or using this software, you are agreeing to be bound by the terms of this License. If you do not or cannot agree to the terms of this License, please do not download or use the software.\
+\
+1. General; Definitions. This License applies to any program or other work which Apple Computer, Inc. ("Apple") makes publicly available and which contains a notice placed by Apple identifying such program or work as "Original Code" and stating that it is subject to the terms of this Apple Public Source License version 2.0 ("License"). As used in this License:\
+\
+1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to Apple and (ii) that cover subject matter contained in the Original Code, but only to the extent necessary to use, reproduce and/or distribute the Original Code without infringement; and (b) in the case where You are the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to You and (ii) that cover subject matter in Your Modifications, taken alone or in combination with Original Code.\
+\
+1.2 "Contributor" means any person or entity that creates or contributes to the creation of Modifications.\
+\
+1.3 "Covered Code" means the Original Code, Modifications, the combination of Original Code and any Modifications, and/or any respective portions thereof.\
+\
+1.4 "Externally Deploy" means: (a) to sublicense, distribute or otherwise make Covered Code available, directly or indirectly, to anyone other than You; and/or (b) to use Covered Code, alone or as part of a Larger Work, in any way to provide a service, including but not limited to delivery of content, through electronic communication with a client other than You.\
+\
+1.5 "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License.\
+\
+1.6 "Modifications" mean any addition to, deletion from, and/or change\
+to, the substance and/or structure of the Original Code, any previous\
+Modifications, the combination of Original Code and any previous\
+Modifications, and/or any respective portions thereof. When code is\
+released as a series of files, a Modification is: (a) any addition to\
+or deletion from the contents of a file containing Covered Code;\
+and/or (b) any new file or other representation of computer program\
+statements that contains any part of Covered Code.\
+\
+1.7 "Original Code" means (a) the Source Code of a program or other\
+work as originally made available by Apple under this License,\
+including the Source Code of any updates or upgrades to such programs\
+or works made available by Apple under this License, and that has been\
+expressly identified by Apple as such in the header file(s) of such\
+work; and (b) the object code compiled from such Source Code and\
+originally made available by Apple under this License.\
+\
+1.8 "Source Code" means the human readable form of a program or other\
+work that is suitable for making modifications to it, including all\
+modules it contains, plus any associated interface definition files,\
+scripts used to control compilation and installation of an executable\
+(object code).\
+\
+1.9 "You" or "Your" means an individual or a legal entity exercising\
+rights under this License. For legal entities, "You" or "Your"\
+includes any entity which controls, is controlled by, or is under\
+common control with, You, where "control" means (a) the power, direct\
+or indirect, to cause the direction or management of such entity,\
+whether by contract or otherwise, or (b) ownership of fifty percent\
+(50%) or more of the outstanding shares or beneficial ownership of\
+such entity.\
+\
+2. Permitted Uses; Conditions & Restrictions. Subject to the terms\
+and conditions of this License, Apple hereby grants You, effective on\
+the date You accept this License and download the Original Code, a\
+world-wide, royalty-free, non-exclusive license, to the extent of\
+Apple's Applicable Patent Rights and copyrights covering the Original\
+Code, to do the following:\
+\
+2.1 Unmodified Code. You may use, reproduce, display, perform,\
+internally distribute within Your organization, and Externally Deploy\
+verbatim, unmodified copies of the Original Code, for commercial or\
+non-commercial purposes, provided that in each instance:\
+\
+(a) You must retain and reproduce in all copies of Original Code the\
+copyright and other proprietary notices and disclaimers of Apple as\
+they appear in the Original Code, and keep intact all notices in the\
+Original Code that refer to this License; and\
+\
+(b) You must include a copy of this License with every copy of Source\
+Code of Covered Code and documentation You distribute or Externally\
+Deploy, and You may not offer or impose any terms on such Source Code\
+that alter or restrict this License or the recipients' rights\
+hereunder, except as permitted under Section 6.\
+\
+2.2 Modified Code. You may modify Covered Code and use, reproduce,\
+display, perform, internally distribute within Your organization, and\
+Externally Deploy Your Modifications and Covered Code, for commercial\
+or non-commercial purposes, provided that in each instance You also\
+meet all of these conditions:\
+\
+(a) You must satisfy all the conditions of Section 2.1 with respect to\
+the Source Code of the Covered Code;\
+\
+(b) You must duplicate, to the extent it does not already exist, the\
+notice in Exhibit A in each file of the Source Code of all Your\
+Modifications, and cause the modified files to carry prominent notices\
+stating that You changed the files and the date of any change; and\
+\
+(c) If You Externally Deploy Your Modifications, You must make\
+Source Code of all Your Externally Deployed Modifications either\
+available to those to whom You have Externally Deployed Your\
+Modifications, or publicly available. Source Code of Your Externally\
+Deployed Modifications must be released under the terms set forth in\
+this License, including the license grants set forth in Section 3\
+below, for as long as you Externally Deploy the Covered Code or twelve\
+(12) months from the date of initial External Deployment, whichever is\
+longer. You should preferably distribute the Source Code of Your\
+Externally Deployed Modifications electronically (e.g. download from a\
+web site).\
+\
+2.3 Distribution of Executable Versions. In addition, if You\
+Externally Deploy Covered Code (Original Code and/or Modifications) in\
+object code, executable form only, You must include a prominent\
+notice, in the code itself as well as in related documentation,\
+stating that Source Code of the Covered Code is available under the\
+terms of this License with information on how and where to obtain such\
+Source Code.\
+\
+2.4 Third Party Rights. You expressly acknowledge and agree that\
+although Apple and each Contributor grants the licenses to their\
+respective portions of the Covered Code set forth herein, no\
+assurances are provided by Apple or any Contributor that the Covered\
+Code does not infringe the patent or other intellectual property\
+rights of any other entity. Apple and each Contributor disclaim any\
+liability to You for claims brought by any other entity based on\
+infringement of intellectual property rights or otherwise. As a\
+condition to exercising the rights and licenses granted hereunder, You\
+hereby assume sole responsibility to secure any other intellectual\
+property rights needed, if any. For example, if a third party patent\
+license is required to allow You to distribute the Covered Code, it is\
+Your responsibility to acquire that license before distributing the\
+Covered Code.\
+\
+3. Your Grants. In consideration of, and as a condition to, the\
+licenses granted to You under this License, You hereby grant to any\
+person or entity receiving or distributing Covered Code under this\
+License a non-exclusive, royalty-free, perpetual, irrevocable license,\
+under Your Applicable Patent Rights and other intellectual property\
+rights (other than patent) owned or controlled by You, to use,\
+reproduce, display, perform, modify, sublicense, distribute and\
+Externally Deploy Your Modifications of the same scope and extent as\
+Apple's licenses under Sections 2.1 and 2.2 above.\
+\
+4. Larger Works. You may create a Larger Work by combining Covered\
+Code with other code not governed by the terms of this License and\
+distribute the Larger Work as a single product. In each such instance,\
+You must make sure the requirements of this License are fulfilled for\
+the Covered Code or any portion thereof.\
+\
+5. Limitations on Patent License. Except as expressly stated in\
+Section 2, no other patent rights, express or implied, are granted by\
+Apple herein. Modifications and/or Larger Works may require additional\
+patent licenses from Apple which Apple may grant in its sole\
+discretion.\
+\
+6. Additional Terms. You may choose to offer, and to charge a fee for,\
+warranty, support, indemnity or liability obligations and/or other\
+rights consistent with the scope of the license granted herein\
+("Additional Terms") to one or more recipients of Covered Code.\
+However, You may do so only on Your own behalf and as Your sole\
+responsibility, and not on behalf of Apple or any Contributor. You\
+must obtain the recipient's agreement that any such Additional Terms\
+are offered by You alone, and You hereby agree to indemnify, defend\
+and hold Apple and every Contributor harmless for any liability\
+incurred by or claims asserted against Apple or such Contributor by\
+reason of any such Additional Terms.\
+\
+7. Versions of the License. Apple may publish revised and/or new\
+versions of this License from time to time. Each version will be given\
+a distinguishing version number. Once Original Code has been published\
+under a particular version of this License, You may continue to use it\
+under the terms of that version. You may also choose to use such\
+Original Code under the terms of any subsequent version of this\
+License published by Apple. No one other than Apple has the right to\
+modify the terms applicable to Covered Code created under this\
+License.\
+\
+8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in\
+part pre-release, untested, or not fully tested works. The Covered\
+Code may contain errors that could cause failures or loss of data, and\
+may be incomplete or contain inaccuracies. You expressly acknowledge\
+and agree that use of the Covered Code, or any portion thereof, is at\
+Your sole and entire risk. THE COVERED CODE IS PROVIDED "AS IS" AND\
+WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND\
+APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" FOR THE\
+PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM\
+ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT\
+NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF\
+MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR\
+PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD\
+PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST\
+INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE\
+FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS,\
+THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR\
+ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO\
+ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE\
+AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY.\
+You acknowledge that the Covered Code is not intended for use in the\
+operation of nuclear facilities, aircraft navigation, communication\
+systems, or air traffic control machines in which case the failure of\
+the Covered Code could lead to death, personal injury, or severe\
+physical or environmental damage.\
+\
+9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO\
+EVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL,\
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING\
+TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR\
+ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY,\
+TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF\
+APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\
+DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY\
+REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF\
+INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY\
+TO YOU. In no event shall Apple's total liability to You for all\
+damages (other than as may be required by applicable law) under this\
+License exceed the amount of fifty dollars ($50.00).\
+\
+10. Trademarks. This License does not grant any rights to use the\
+trademarks or trade names "Apple", "Apple Computer", "Mac", "Mac OS",\
+"QuickTime", "QuickTime Streaming Server" or any other trademarks,\
+service marks, logos or trade names belonging to Apple (collectively\
+"Apple Marks") or to any trademark, service mark, logo or trade name\
+belonging to any Contributor. You agree not to use any Apple Marks in\
+or as part of the name of products derived from the Original Code or\
+to endorse or promote products derived from the Original Code other\
+than as expressly permitted by and in strict compliance at all times\
+with Apple's third party trademark usage guidelines which are posted\
+at http://www.apple.com/legal/guidelinesfor3rdparties.html.\
+\
+11. Ownership. Subject to the licenses granted under this License,\
+each Contributor retains all rights, title and interest in and to any\
+Modifications made by such Contributor. Apple retains all rights,\
+title and interest in and to the Original Code and any Modifications\
+made by or on behalf of Apple ("Apple Modifications"), and such Apple\
+Modifications will not be automatically subject to this License. Apple\
+may, at its sole discretion, choose to license such Apple\
+Modifications under this License, or on different terms from those\
+contained in this License or may choose not to license them at all.\
+\
+12. Termination.\
+\
+12.1 Termination. This License and the rights granted hereunder will\
+terminate:\
+\
+(a) automatically without notice from Apple if You fail to comply with\
+any term(s) of this License and fail to cure such breach within 30\
+days of becoming aware of such breach;\
+\
+(b) immediately in the event of the circumstances described in Section\
+13.5(b); or\
+\
+(c) automatically without notice from Apple if You, at any time during\
+the term of this License, commence an action for patent infringement\
+against Apple; provided that Apple did not first commence\
+an action for patent infringement against You in that instance.\
+\
+12.2 Effect of Termination. Upon termination, You agree to immediately\
+stop any further use, reproduction, modification, sublicensing and\
+distribution of the Covered Code. All sublicenses to the Covered Code\
+which have been properly granted prior to termination shall survive\
+any termination of this License. Provisions which, by their nature,\
+should remain in effect beyond the termination of this License shall\
+survive, including but not limited to Sections 3, 5, 8, 9, 10, 11,\
+12.2 and 13. No party will be liable to any other for compensation,\
+indemnity or damages of any sort solely as a result of terminating\
+this License in accordance with its terms, and termination of this\
+License will be without prejudice to any other right or remedy of\
+any party.\
+\
+13. Miscellaneous.\
+\
+13.1 Government End Users. The Covered Code is a "commercial item" as\
+defined in FAR 2.101. Government software and technical data rights in\
+the Covered Code include only those rights customarily provided to the\
+public as defined in this License. This customary commercial license\
+in technical data and software is provided in accordance with FAR\
+12.211 (Technical Data) and 12.212 (Computer Software) and, for\
+Department of Defense purchases, DFAR 252.227-7015 (Technical Data --\
+Commercial Items) and 227.7202-3 (Rights in Commercial Computer\
+Software or Computer Software Documentation). Accordingly, all U.S.\
+Government End Users acquire Covered Code with only those rights set\
+forth herein.\
+\
+13.2 Relationship of Parties. This License will not be construed as\
+creating an agency, partnership, joint venture or any other form of\
+legal association between or among You, Apple or any Contributor, and\
+You will not represent to the contrary, whether expressly, by\
+implication, appearance or otherwise.\
+\
+13.3 Independent Development. Nothing in this License will impair\
+Apple's right to acquire, license, develop, have others develop for\
+it, market and/or distribute technology or products that perform the\
+same or similar functions as, or otherwise compete with,\
+Modifications, Larger Works, technology or products that You may\
+develop, produce, market or distribute.\
+\
+13.4 Waiver; Construction. Failure by Apple or any Contributor to\
+enforce any provision of this License will not be deemed a waiver of\
+future enforcement of that or any other provision. Any law or\
+regulation which provides that the language of a contract shall be\
+construed against the drafter will not apply to this License.\
+\
+13.5 Severability. (a) If for any reason a court of competent\
+jurisdiction finds any provision of this License, or portion thereof,\
+to be unenforceable, that provision of the License will be enforced to\
+the maximum extent permissible so as to effect the economic benefits\
+and intent of the parties, and the remainder of this License will\
+continue in full force and effect. (b) Notwithstanding the foregoing,\
+if applicable law prohibits or restricts You from fully and/or\
+specifically complying with Sections 2 and/or 3 or prevents the\
+enforceability of either of those Sections, this License will\
+immediately terminate and You must immediately discontinue any use of\
+the Covered Code and destroy all copies of it that are in your\
+possession or control.\
+\
+13.6 Dispute Resolution. Any litigation or other dispute resolution\
+between You and Apple relating to this License shall take place in the\
+Northern District of California, and You and Apple hereby consent to\
+the personal jurisdiction of, and venue in, the state and federal\
+courts within that District with respect to this License. The\
+application of the United Nations Convention on Contracts for the\
+International Sale of Goods is expressly excluded.\
+\
+13.7 Entire Agreement; Governing Law. This License constitutes the\
+entire agreement between the parties with respect to the subject\
+matter hereof. This License shall be governed by the laws of the\
+United States and the State of California, except that body of\
+California law concerning conflicts of law.\
+\
+Where You are located in the province of Quebec, Canada, the following\
+clause applies: The parties hereby confirm that they have requested\
+that this License and all related documents be drafted in English. Les\
+parties ont exige que le present contrat et tous les documents\
+connexes soient rediges en anglais.\
+\
+EXHIBIT A.\
+\
+"Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights\
+Reserved.\
+\
+This file contains Original Code and/or Modifications of Original Code\
+as defined in and that are subject to the Apple Public Source License\
+Version 2.0 (the 'License'). You may not use this file except in\
+compliance with the License. Please obtain a copy of the License at\
+http://www.opensource.apple.com/apsl/ and read it before using this\
+file.\
+\
+The Original Code and all software distributed under the License are\
+distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\
+EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\
+INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\
+FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\
+Please see the License for the specific language governing rights and\
+limitations under the License." }
\ No newline at end of file
Index: trunk/PackageBuilder/package/Resources/Italian.lproj/Description.html
===================================================================
--- trunk/PackageBuilder/package/Resources/Italian.lproj/Description.html (revision 0)
+++ trunk/PackageBuilder/package/Resources/Italian.lproj/Description.html (revision 340)
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+Chameleon è la combinazione di diverse parti del boot loader.
È basato sulle modifiche di David Elliott sull'implementazione "EFI" al progetto della Apple sul boot-132.
Chameleon presenta le seguenti caratteristiche principali:
+
+Nuove caratteristiche di Chameleon 2.0
+
+ - Interfaccia grafica completamente personalizzabile per dare maggiori colori al Darwin Bootloader.
+ - Avviare DVD retail semplicemente caricando una immagine ramdisk senza l'utilizzo di programmi aggiuntivi.
+ - Ibernazione. Godetevi nel riprendere il vostro Mac OS X con un'immagine di anteprima.
+ - Sovrascrittura dle SMBIOS per personalizzare i valori dell'SMBIOS.
+ - Sovrascrittura della tabella DSDT, potendo selezionare una ottimizzata che risolve svariate problematiche.
+
+ - Iniezione delle Proprità delle Periferiche con stringhe EFI in device-properties.
+ - boot0 / boot1h ibrido per dischi partizionati in MBR e GPT.
+ - Riconoscimento automatico della frequenza anche sui recenti processori AMD.
+ - Supporta il RAID software di Apple.
+
+Per maggiori informazioni, visita : http://chameleon.osx86.hu
+
+
\ No newline at end of file
Index: trunk/PackageBuilder/package/Resources/Italian.lproj/Localizable.strings
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Resources/Italian.lproj/Localizable.strings
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Resources/Italian.lproj/Welcome.rtfd/TXT.rtf
===================================================================
--- trunk/PackageBuilder/package/Resources/Italian.lproj/Welcome.rtfd/TXT.rtf (revision 0)
+++ trunk/PackageBuilder/package/Resources/Italian.lproj/Welcome.rtfd/TXT.rtf (revision 340)
@@ -0,0 +1,25 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
+{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
+{\colortbl;\red255\green255\blue255;\red65\green78\blue255;}
+\margl1440\margr1440\vieww13160\viewh11700\viewkind0
+\pard\ri0\qc
+
+\f0\b\fs72 \cf0 Chameleon
+\fs50 \
+
+\fs26 v%CHAMELEONVERSION% r%CHAMELEONREVISION%
+\fs50 \
+\
+\cf2 %CHAMELEONSTAGE%\cf0 \
+\
+\pard\ri0\ql\qnatural
+
+\fs26 \cf0 Sviluppatori: Crazor, Dense, fassl, fxtentacle, iNDi, JrCs, Kabyl, kaitek, mackerintel, mercurysquad, mozodojo, munky, rekursor, Turbo & zef \
+\
+Grazie a : asereBLN, bumby, cosmolt, dfe, Galaxy, kalyway, Krazubu, netkas, sckevyn, smith@@, THeKiNG, XyZ, blackosx
+\b0\fs30 \
+\pard\tx360\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
+\cf0 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\fs26 \cf0 Copyright \'a9 2010}
\ No newline at end of file
Index: trunk/PackageBuilder/package/Resources/Italian.lproj/Conclusion.rtfd/TXT.rtf
===================================================================
--- trunk/PackageBuilder/package/Resources/Italian.lproj/Conclusion.rtfd/TXT.rtf (revision 0)
+++ trunk/PackageBuilder/package/Resources/Italian.lproj/Conclusion.rtfd/TXT.rtf (revision 340)
@@ -0,0 +1,34 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
+{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
+{\colortbl;\red255\green255\blue255;\red65\green78\blue255;\red255\green0\blue0;}
+\margl1440\margr1440\vieww11660\viewh12980\viewkind0
+\pard\ri0\qc
+
+\f0\b\fs72 \cf0 Chameleon
+\fs50 \
+
+\fs26 v%CHAMELEONVERSION% r%CHAMELEONREVISION%
+\fs50 \
+\
+\cf2 %CHAMELEONSTAGE%\cf0 \
+\pard\ri0\ql\qnatural
+
+\fs26 \cf0 \
+\pard\ri0\qc
+
+\fs50 \cf3 Installazione terminata!
+\b0\fs26 \cf0 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\fs18 \cf0 \
+{\field{\*\fldinst{HYPERLINK "http://chameleon.osx86.hu/"}}{\fldrslt
+\fs26 http://chameleon.osx86.hu/}}
+\fs26 \
+{\field{\*\fldinst{HYPERLINK "http://forum.voodooprojects.org/index.php"}}{\fldrslt http://forum.voodooprojects.org/index.php}}
+\b \
+\pard\tx360\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
+
+\b0\fs30 \cf0 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\fs26 \cf0 Copyright \'a9 2010}
\ No newline at end of file
Index: trunk/PackageBuilder/package/Resources/Italian.lproj/License.rtf
===================================================================
--- trunk/PackageBuilder/package/Resources/Italian.lproj/License.rtf (revision 0)
+++ trunk/PackageBuilder/package/Resources/Italian.lproj/License.rtf (revision 340)
@@ -0,0 +1,350 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
+{\fonttbl\f0\fmodern\fcharset0 Courier-Bold;\f1\fmodern\fcharset0 Courier;}
+{\colortbl;\red255\green255\blue255;}
+\paperw12240\paperh15840\vieww22060\viewh18360\viewkind0
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\f0\b\fs40 \cf0 APPLE PUBLIC SOURCE LICENSE \
+
+\fs26 Version 2.0 - August 6, 2003\
+\
+
+\f1\b0 Please read this License carefully before downloading this software. By downloading or using this software, you are agreeing to be bound by the terms of this License. If you do not or cannot agree to the terms of this License, please do not download or use the software.\
+\
+1. General; Definitions. This License applies to any program or other work which Apple Computer, Inc. ("Apple") makes publicly available and which contains a notice placed by Apple identifying such program or work as "Original Code" and stating that it is subject to the terms of this Apple Public Source License version 2.0 ("License"). As used in this License:\
+\
+1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to Apple and (ii) that cover subject matter contained in the Original Code, but only to the extent necessary to use, reproduce and/or distribute the Original Code without infringement; and (b) in the case where You are the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to You and (ii) that cover subject matter in Your Modifications, taken alone or in combination with Original Code.\
+\
+1.2 "Contributor" means any person or entity that creates or contributes to the creation of Modifications.\
+\
+1.3 "Covered Code" means the Original Code, Modifications, the combination of Original Code and any Modifications, and/or any respective portions thereof.\
+\
+1.4 "Externally Deploy" means: (a) to sublicense, distribute or otherwise make Covered Code available, directly or indirectly, to anyone other than You; and/or (b) to use Covered Code, alone or as part of a Larger Work, in any way to provide a service, including but not limited to delivery of content, through electronic communication with a client other than You.\
+\
+1.5 "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License.\
+\
+1.6 "Modifications" mean any addition to, deletion from, and/or change\
+to, the substance and/or structure of the Original Code, any previous\
+Modifications, the combination of Original Code and any previous\
+Modifications, and/or any respective portions thereof. When code is\
+released as a series of files, a Modification is: (a) any addition to\
+or deletion from the contents of a file containing Covered Code;\
+and/or (b) any new file or other representation of computer program\
+statements that contains any part of Covered Code.\
+\
+1.7 "Original Code" means (a) the Source Code of a program or other\
+work as originally made available by Apple under this License,\
+including the Source Code of any updates or upgrades to such programs\
+or works made available by Apple under this License, and that has been\
+expressly identified by Apple as such in the header file(s) of such\
+work; and (b) the object code compiled from such Source Code and\
+originally made available by Apple under this License.\
+\
+1.8 "Source Code" means the human readable form of a program or other\
+work that is suitable for making modifications to it, including all\
+modules it contains, plus any associated interface definition files,\
+scripts used to control compilation and installation of an executable\
+(object code).\
+\
+1.9 "You" or "Your" means an individual or a legal entity exercising\
+rights under this License. For legal entities, "You" or "Your"\
+includes any entity which controls, is controlled by, or is under\
+common control with, You, where "control" means (a) the power, direct\
+or indirect, to cause the direction or management of such entity,\
+whether by contract or otherwise, or (b) ownership of fifty percent\
+(50%) or more of the outstanding shares or beneficial ownership of\
+such entity.\
+\
+2. Permitted Uses; Conditions & Restrictions. Subject to the terms\
+and conditions of this License, Apple hereby grants You, effective on\
+the date You accept this License and download the Original Code, a\
+world-wide, royalty-free, non-exclusive license, to the extent of\
+Apple's Applicable Patent Rights and copyrights covering the Original\
+Code, to do the following:\
+\
+2.1 Unmodified Code. You may use, reproduce, display, perform,\
+internally distribute within Your organization, and Externally Deploy\
+verbatim, unmodified copies of the Original Code, for commercial or\
+non-commercial purposes, provided that in each instance:\
+\
+(a) You must retain and reproduce in all copies of Original Code the\
+copyright and other proprietary notices and disclaimers of Apple as\
+they appear in the Original Code, and keep intact all notices in the\
+Original Code that refer to this License; and\
+\
+(b) You must include a copy of this License with every copy of Source\
+Code of Covered Code and documentation You distribute or Externally\
+Deploy, and You may not offer or impose any terms on such Source Code\
+that alter or restrict this License or the recipients' rights\
+hereunder, except as permitted under Section 6.\
+\
+2.2 Modified Code. You may modify Covered Code and use, reproduce,\
+display, perform, internally distribute within Your organization, and\
+Externally Deploy Your Modifications and Covered Code, for commercial\
+or non-commercial purposes, provided that in each instance You also\
+meet all of these conditions:\
+\
+(a) You must satisfy all the conditions of Section 2.1 with respect to\
+the Source Code of the Covered Code;\
+\
+(b) You must duplicate, to the extent it does not already exist, the\
+notice in Exhibit A in each file of the Source Code of all Your\
+Modifications, and cause the modified files to carry prominent notices\
+stating that You changed the files and the date of any change; and\
+\
+(c) If You Externally Deploy Your Modifications, You must make\
+Source Code of all Your Externally Deployed Modifications either\
+available to those to whom You have Externally Deployed Your\
+Modifications, or publicly available. Source Code of Your Externally\
+Deployed Modifications must be released under the terms set forth in\
+this License, including the license grants set forth in Section 3\
+below, for as long as you Externally Deploy the Covered Code or twelve\
+(12) months from the date of initial External Deployment, whichever is\
+longer. You should preferably distribute the Source Code of Your\
+Externally Deployed Modifications electronically (e.g. download from a\
+web site).\
+\
+2.3 Distribution of Executable Versions. In addition, if You\
+Externally Deploy Covered Code (Original Code and/or Modifications) in\
+object code, executable form only, You must include a prominent\
+notice, in the code itself as well as in related documentation,\
+stating that Source Code of the Covered Code is available under the\
+terms of this License with information on how and where to obtain such\
+Source Code.\
+\
+2.4 Third Party Rights. You expressly acknowledge and agree that\
+although Apple and each Contributor grants the licenses to their\
+respective portions of the Covered Code set forth herein, no\
+assurances are provided by Apple or any Contributor that the Covered\
+Code does not infringe the patent or other intellectual property\
+rights of any other entity. Apple and each Contributor disclaim any\
+liability to You for claims brought by any other entity based on\
+infringement of intellectual property rights or otherwise. As a\
+condition to exercising the rights and licenses granted hereunder, You\
+hereby assume sole responsibility to secure any other intellectual\
+property rights needed, if any. For example, if a third party patent\
+license is required to allow You to distribute the Covered Code, it is\
+Your responsibility to acquire that license before distributing the\
+Covered Code.\
+\
+3. Your Grants. In consideration of, and as a condition to, the\
+licenses granted to You under this License, You hereby grant to any\
+person or entity receiving or distributing Covered Code under this\
+License a non-exclusive, royalty-free, perpetual, irrevocable license,\
+under Your Applicable Patent Rights and other intellectual property\
+rights (other than patent) owned or controlled by You, to use,\
+reproduce, display, perform, modify, sublicense, distribute and\
+Externally Deploy Your Modifications of the same scope and extent as\
+Apple's licenses under Sections 2.1 and 2.2 above.\
+\
+4. Larger Works. You may create a Larger Work by combining Covered\
+Code with other code not governed by the terms of this License and\
+distribute the Larger Work as a single product. In each such instance,\
+You must make sure the requirements of this License are fulfilled for\
+the Covered Code or any portion thereof.\
+\
+5. Limitations on Patent License. Except as expressly stated in\
+Section 2, no other patent rights, express or implied, are granted by\
+Apple herein. Modifications and/or Larger Works may require additional\
+patent licenses from Apple which Apple may grant in its sole\
+discretion.\
+\
+6. Additional Terms. You may choose to offer, and to charge a fee for,\
+warranty, support, indemnity or liability obligations and/or other\
+rights consistent with the scope of the license granted herein\
+("Additional Terms") to one or more recipients of Covered Code.\
+However, You may do so only on Your own behalf and as Your sole\
+responsibility, and not on behalf of Apple or any Contributor. You\
+must obtain the recipient's agreement that any such Additional Terms\
+are offered by You alone, and You hereby agree to indemnify, defend\
+and hold Apple and every Contributor harmless for any liability\
+incurred by or claims asserted against Apple or such Contributor by\
+reason of any such Additional Terms.\
+\
+7. Versions of the License. Apple may publish revised and/or new\
+versions of this License from time to time. Each version will be given\
+a distinguishing version number. Once Original Code has been published\
+under a particular version of this License, You may continue to use it\
+under the terms of that version. You may also choose to use such\
+Original Code under the terms of any subsequent version of this\
+License published by Apple. No one other than Apple has the right to\
+modify the terms applicable to Covered Code created under this\
+License.\
+\
+8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in\
+part pre-release, untested, or not fully tested works. The Covered\
+Code may contain errors that could cause failures or loss of data, and\
+may be incomplete or contain inaccuracies. You expressly acknowledge\
+and agree that use of the Covered Code, or any portion thereof, is at\
+Your sole and entire risk. THE COVERED CODE IS PROVIDED "AS IS" AND\
+WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND\
+APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" FOR THE\
+PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM\
+ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT\
+NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF\
+MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR\
+PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD\
+PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST\
+INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE\
+FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS,\
+THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR\
+ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO\
+ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE\
+AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY.\
+You acknowledge that the Covered Code is not intended for use in the\
+operation of nuclear facilities, aircraft navigation, communication\
+systems, or air traffic control machines in which case the failure of\
+the Covered Code could lead to death, personal injury, or severe\
+physical or environmental damage.\
+\
+9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO\
+EVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL,\
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING\
+TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR\
+ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY,\
+TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF\
+APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\
+DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY\
+REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF\
+INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY\
+TO YOU. In no event shall Apple's total liability to You for all\
+damages (other than as may be required by applicable law) under this\
+License exceed the amount of fifty dollars ($50.00).\
+\
+10. Trademarks. This License does not grant any rights to use the\
+trademarks or trade names "Apple", "Apple Computer", "Mac", "Mac OS",\
+"QuickTime", "QuickTime Streaming Server" or any other trademarks,\
+service marks, logos or trade names belonging to Apple (collectively\
+"Apple Marks") or to any trademark, service mark, logo or trade name\
+belonging to any Contributor. You agree not to use any Apple Marks in\
+or as part of the name of products derived from the Original Code or\
+to endorse or promote products derived from the Original Code other\
+than as expressly permitted by and in strict compliance at all times\
+with Apple's third party trademark usage guidelines which are posted\
+at http://www.apple.com/legal/guidelinesfor3rdparties.html.\
+\
+11. Ownership. Subject to the licenses granted under this License,\
+each Contributor retains all rights, title and interest in and to any\
+Modifications made by such Contributor. Apple retains all rights,\
+title and interest in and to the Original Code and any Modifications\
+made by or on behalf of Apple ("Apple Modifications"), and such Apple\
+Modifications will not be automatically subject to this License. Apple\
+may, at its sole discretion, choose to license such Apple\
+Modifications under this License, or on different terms from those\
+contained in this License or may choose not to license them at all.\
+\
+12. Termination.\
+\
+12.1 Termination. This License and the rights granted hereunder will\
+terminate:\
+\
+(a) automatically without notice from Apple if You fail to comply with\
+any term(s) of this License and fail to cure such breach within 30\
+days of becoming aware of such breach;\
+\
+(b) immediately in the event of the circumstances described in Section\
+13.5(b); or\
+\
+(c) automatically without notice from Apple if You, at any time during\
+the term of this License, commence an action for patent infringement\
+against Apple; provided that Apple did not first commence\
+an action for patent infringement against You in that instance.\
+\
+12.2 Effect of Termination. Upon termination, You agree to immediately\
+stop any further use, reproduction, modification, sublicensing and\
+distribution of the Covered Code. All sublicenses to the Covered Code\
+which have been properly granted prior to termination shall survive\
+any termination of this License. Provisions which, by their nature,\
+should remain in effect beyond the termination of this License shall\
+survive, including but not limited to Sections 3, 5, 8, 9, 10, 11,\
+12.2 and 13. No party will be liable to any other for compensation,\
+indemnity or damages of any sort solely as a result of terminating\
+this License in accordance with its terms, and termination of this\
+License will be without prejudice to any other right or remedy of\
+any party.\
+\
+13. Miscellaneous.\
+\
+13.1 Government End Users. The Covered Code is a "commercial item" as\
+defined in FAR 2.101. Government software and technical data rights in\
+the Covered Code include only those rights customarily provided to the\
+public as defined in this License. This customary commercial license\
+in technical data and software is provided in accordance with FAR\
+12.211 (Technical Data) and 12.212 (Computer Software) and, for\
+Department of Defense purchases, DFAR 252.227-7015 (Technical Data --\
+Commercial Items) and 227.7202-3 (Rights in Commercial Computer\
+Software or Computer Software Documentation). Accordingly, all U.S.\
+Government End Users acquire Covered Code with only those rights set\
+forth herein.\
+\
+13.2 Relationship of Parties. This License will not be construed as\
+creating an agency, partnership, joint venture or any other form of\
+legal association between or among You, Apple or any Contributor, and\
+You will not represent to the contrary, whether expressly, by\
+implication, appearance or otherwise.\
+\
+13.3 Independent Development. Nothing in this License will impair\
+Apple's right to acquire, license, develop, have others develop for\
+it, market and/or distribute technology or products that perform the\
+same or similar functions as, or otherwise compete with,\
+Modifications, Larger Works, technology or products that You may\
+develop, produce, market or distribute.\
+\
+13.4 Waiver; Construction. Failure by Apple or any Contributor to\
+enforce any provision of this License will not be deemed a waiver of\
+future enforcement of that or any other provision. Any law or\
+regulation which provides that the language of a contract shall be\
+construed against the drafter will not apply to this License.\
+\
+13.5 Severability. (a) If for any reason a court of competent\
+jurisdiction finds any provision of this License, or portion thereof,\
+to be unenforceable, that provision of the License will be enforced to\
+the maximum extent permissible so as to effect the economic benefits\
+and intent of the parties, and the remainder of this License will\
+continue in full force and effect. (b) Notwithstanding the foregoing,\
+if applicable law prohibits or restricts You from fully and/or\
+specifically complying with Sections 2 and/or 3 or prevents the\
+enforceability of either of those Sections, this License will\
+immediately terminate and You must immediately discontinue any use of\
+the Covered Code and destroy all copies of it that are in your\
+possession or control.\
+\
+13.6 Dispute Resolution. Any litigation or other dispute resolution\
+between You and Apple relating to this License shall take place in the\
+Northern District of California, and You and Apple hereby consent to\
+the personal jurisdiction of, and venue in, the state and federal\
+courts within that District with respect to this License. The\
+application of the United Nations Convention on Contracts for the\
+International Sale of Goods is expressly excluded.\
+\
+13.7 Entire Agreement; Governing Law. This License constitutes the\
+entire agreement between the parties with respect to the subject\
+matter hereof. This License shall be governed by the laws of the\
+United States and the State of California, except that body of\
+California law concerning conflicts of law.\
+\
+Where You are located in the province of Quebec, Canada, the following\
+clause applies: The parties hereby confirm that they have requested\
+that this License and all related documents be drafted in English. Les\
+parties ont exige que le present contrat et tous les documents\
+connexes soient rediges en anglais.\
+\
+EXHIBIT A.\
+\
+"Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights\
+Reserved.\
+\
+This file contains Original Code and/or Modifications of Original Code\
+as defined in and that are subject to the Apple Public Source License\
+Version 2.0 (the 'License'). You may not use this file except in\
+compliance with the License. Please obtain a copy of the License at\
+http://www.opensource.apple.com/apsl/ and read it before using this\
+file.\
+\
+The Original Code and all software distributed under the License are\
+distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\
+EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\
+INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\
+FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\
+Please see the License for the specific language governing rights and\
+limitations under the License." }
\ No newline at end of file
Index: trunk/PackageBuilder/package/Resources/background.tiff
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Resources/background.tiff
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Resources/Portuguese.lproj/Description.html
===================================================================
--- trunk/PackageBuilder/package/Resources/Portuguese.lproj/Description.html (revision 0)
+++ trunk/PackageBuilder/package/Resources/Portuguese.lproj/Description.html (revision 340)
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+O Chameleon é um boot loader que combina vários componentes.
Ele é baseado na implementação de fake EFI feita por David Elliott, adicionada ao projeto boot-132 da Apple.
O Chameleon é extendido com as seguintes características chave:
+
+Novos recursos no Chameleon 2.0
+
+ - Interface gráfica (GUI) totalmente personalizável para trazer algumas cores ao Bootloader Darwin.
+ - Inicializa DVDs retail lendo uma imagem ramdisk diretamente, sem ajuda de nenhum programa adicional.
+ - Hibernação. Aproveite continuar o seu Mac OS X com uma amostra de imagem da tela.
+ - Substituição de SMBIOS para modificar os valores de fábrica.
+ - Substituição de DSDT para usar uma tabela modificada que pode resolver diversos problemas.
+
+ - Injeção de propriedades de dispositivo através do string device-properties.
+ - boot0 / boot1h híbridos para discos particionados em MBR e GPT.
+ - Detecção automática de FSB mesmo para processadores AMD recentes.
+ - Suporte a Software RAID da Apple.
+
+Para informações detalhadas visite: http://chameleon.osx86.hu
+
+
Index: trunk/PackageBuilder/package/Resources/Portuguese.lproj/Localizable.strings
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/PackageBuilder/package/Resources/Portuguese.lproj/Localizable.strings
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/PackageBuilder/package/Resources/Portuguese.lproj/Welcome.rtfd/TXT.rtf
===================================================================
--- trunk/PackageBuilder/package/Resources/Portuguese.lproj/Welcome.rtfd/TXT.rtf (revision 0)
+++ trunk/PackageBuilder/package/Resources/Portuguese.lproj/Welcome.rtfd/TXT.rtf (revision 340)
@@ -0,0 +1,26 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
+{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
+{\colortbl;\red255\green255\blue255;\red65\green78\blue255;}
+\margl1440\margr1440\vieww11660\viewh12980\viewkind0
+\pard\ri0\qc
+
+\f0\b\fs72 \cf0 Chameleon
+\fs50 \
+
+\fs26 v%CHAMELEONVERSION% r%CHAMELEONREVISION%
+\fs50 \
+\
+\cf2 %CHAMELEONSTAGE%
+\fs26 \cf0 \
+\
+\pard\ri0\ql\qnatural
+\cf0 Desenvolvedores: Crazor, Dense, fassl, fxtentacle, iNDi, JrCs, Kabyl, kaitek, mackerintel, mercurysquad, mozodojo, munky, rekursor, Turbo & zef \
+\
+\
+Agradecimentos a: asereBLN, bumby, cosmolt, dfe, Galaxy, kalyway, Krazubu, netkas, sckevyn, smith@@, THeKiNG, XyZ, blackosx\
+\pard\tx360\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
+
+\b0\fs30 \cf0 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\fs26 \cf0 Copyright \'a9 2010}
\ No newline at end of file
Index: trunk/PackageBuilder/package/Resources/Portuguese.lproj/Conclusion.rtfd/TXT.rtf
===================================================================
--- trunk/PackageBuilder/package/Resources/Portuguese.lproj/Conclusion.rtfd/TXT.rtf (revision 0)
+++ trunk/PackageBuilder/package/Resources/Portuguese.lproj/Conclusion.rtfd/TXT.rtf (revision 340)
@@ -0,0 +1,34 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
+{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
+{\colortbl;\red255\green255\blue255;\red65\green78\blue255;\red255\green0\blue0;}
+\margl1440\margr1440\vieww11660\viewh12980\viewkind0
+\pard\ri0\qc
+
+\f0\b\fs72 \cf0 Chameleon
+\fs50 \
+
+\fs26 v%CHAMELEONVERSION% r%CHAMELEONREVISION%
+\fs50 \
+\
+\cf2 %CHAMELEONSTAGE%\cf0 \
+\pard\ri0\ql\qnatural
+
+\fs26 \cf0 \
+\pard\ri0\qc
+
+\fs50 \cf3 Instala\'e7\'e3o Conclu\'edda!
+\b0\fs26 \cf0 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\fs18 \cf0 \
+{\field{\*\fldinst{HYPERLINK "http://chameleon.osx86.hu/"}}{\fldrslt
+\fs26 http://chameleon.osx86.hu/}}
+\fs26 \
+{\field{\*\fldinst{HYPERLINK "http://forum.voodooprojects.org/index.php"}}{\fldrslt http://forum.voodooprojects.org/index.php}}
+\b \
+\pard\tx360\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
+
+\b0\fs30 \cf0 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\fs26 \cf0 Copyright \'a9 2010}
\ No newline at end of file
Index: trunk/PackageBuilder/package/Resources/Portuguese.lproj/License.rtf
===================================================================
--- trunk/PackageBuilder/package/Resources/Portuguese.lproj/License.rtf (revision 0)
+++ trunk/PackageBuilder/package/Resources/Portuguese.lproj/License.rtf (revision 340)
@@ -0,0 +1,350 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
+{\fonttbl\f0\fmodern\fcharset0 Courier-Bold;\f1\fmodern\fcharset0 Courier;}
+{\colortbl;\red255\green255\blue255;}
+\paperw12240\paperh15840\vieww22060\viewh18360\viewkind0
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\f0\b\fs40 \cf0 APPLE PUBLIC SOURCE LICENSE \
+
+\fs26 Version 2.0 - August 6, 2003\
+\
+
+\f1\b0 Please read this License carefully before downloading this software. By downloading or using this software, you are agreeing to be bound by the terms of this License. If you do not or cannot agree to the terms of this License, please do not download or use the software.\
+\
+1. General; Definitions. This License applies to any program or other work which Apple Computer, Inc. ("Apple") makes publicly available and which contains a notice placed by Apple identifying such program or work as "Original Code" and stating that it is subject to the terms of this Apple Public Source License version 2.0 ("License"). As used in this License:\
+\
+1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to Apple and (ii) that cover subject matter contained in the Original Code, but only to the extent necessary to use, reproduce and/or distribute the Original Code without infringement; and (b) in the case where You are the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to You and (ii) that cover subject matter in Your Modifications, taken alone or in combination with Original Code.\
+\
+1.2 "Contributor" means any person or entity that creates or contributes to the creation of Modifications.\
+\
+1.3 "Covered Code" means the Original Code, Modifications, the combination of Original Code and any Modifications, and/or any respective portions thereof.\
+\
+1.4 "Externally Deploy" means: (a) to sublicense, distribute or otherwise make Covered Code available, directly or indirectly, to anyone other than You; and/or (b) to use Covered Code, alone or as part of a Larger Work, in any way to provide a service, including but not limited to delivery of content, through electronic communication with a client other than You.\
+\
+1.5 "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License.\
+\
+1.6 "Modifications" mean any addition to, deletion from, and/or change\
+to, the substance and/or structure of the Original Code, any previous\
+Modifications, the combination of Original Code and any previous\
+Modifications, and/or any respective portions thereof. When code is\
+released as a series of files, a Modification is: (a) any addition to\
+or deletion from the contents of a file containing Covered Code;\
+and/or (b) any new file or other representation of computer program\
+statements that contains any part of Covered Code.\
+\
+1.7 "Original Code" means (a) the Source Code of a program or other\
+work as originally made available by Apple under this License,\
+including the Source Code of any updates or upgrades to such programs\
+or works made available by Apple under this License, and that has been\
+expressly identified by Apple as such in the header file(s) of such\
+work; and (b) the object code compiled from such Source Code and\
+originally made available by Apple under this License.\
+\
+1.8 "Source Code" means the human readable form of a program or other\
+work that is suitable for making modifications to it, including all\
+modules it contains, plus any associated interface definition files,\
+scripts used to control compilation and installation of an executable\
+(object code).\
+\
+1.9 "You" or "Your" means an individual or a legal entity exercising\
+rights under this License. For legal entities, "You" or "Your"\
+includes any entity which controls, is controlled by, or is under\
+common control with, You, where "control" means (a) the power, direct\
+or indirect, to cause the direction or management of such entity,\
+whether by contract or otherwise, or (b) ownership of fifty percent\
+(50%) or more of the outstanding shares or beneficial ownership of\
+such entity.\
+\
+2. Permitted Uses; Conditions & Restrictions. Subject to the terms\
+and conditions of this License, Apple hereby grants You, effective on\
+the date You accept this License and download the Original Code, a\
+world-wide, royalty-free, non-exclusive license, to the extent of\
+Apple's Applicable Patent Rights and copyrights covering the Original\
+Code, to do the following:\
+\
+2.1 Unmodified Code. You may use, reproduce, display, perform,\
+internally distribute within Your organization, and Externally Deploy\
+verbatim, unmodified copies of the Original Code, for commercial or\
+non-commercial purposes, provided that in each instance:\
+\
+(a) You must retain and reproduce in all copies of Original Code the\
+copyright and other proprietary notices and disclaimers of Apple as\
+they appear in the Original Code, and keep intact all notices in the\
+Original Code that refer to this License; and\
+\
+(b) You must include a copy of this License with every copy of Source\
+Code of Covered Code and documentation You distribute or Externally\
+Deploy, and You may not offer or impose any terms on such Source Code\
+that alter or restrict this License or the recipients' rights\
+hereunder, except as permitted under Section 6.\
+\
+2.2 Modified Code. You may modify Covered Code and use, reproduce,\
+display, perform, internally distribute within Your organization, and\
+Externally Deploy Your Modifications and Covered Code, for commercial\
+or non-commercial purposes, provided that in each instance You also\
+meet all of these conditions:\
+\
+(a) You must satisfy all the conditions of Section 2.1 with respect to\
+the Source Code of the Covered Code;\
+\
+(b) You must duplicate, to the extent it does not already exist, the\
+notice in Exhibit A in each file of the Source Code of all Your\
+Modifications, and cause the modified files to carry prominent notices\
+stating that You changed the files and the date of any change; and\
+\
+(c) If You Externally Deploy Your Modifications, You must make\
+Source Code of all Your Externally Deployed Modifications either\
+available to those to whom You have Externally Deployed Your\
+Modifications, or publicly available. Source Code of Your Externally\
+Deployed Modifications must be released under the terms set forth in\
+this License, including the license grants set forth in Section 3\
+below, for as long as you Externally Deploy the Covered Code or twelve\
+(12) months from the date of initial External Deployment, whichever is\
+longer. You should preferably distribute the Source Code of Your\
+Externally Deployed Modifications electronically (e.g. download from a\
+web site).\
+\
+2.3 Distribution of Executable Versions. In addition, if You\
+Externally Deploy Covered Code (Original Code and/or Modifications) in\
+object code, executable form only, You must include a prominent\
+notice, in the code itself as well as in related documentation,\
+stating that Source Code of the Covered Code is available under the\
+terms of this License with information on how and where to obtain such\
+Source Code.\
+\
+2.4 Third Party Rights. You expressly acknowledge and agree that\
+although Apple and each Contributor grants the licenses to their\
+respective portions of the Covered Code set forth herein, no\
+assurances are provided by Apple or any Contributor that the Covered\
+Code does not infringe the patent or other intellectual property\
+rights of any other entity. Apple and each Contributor disclaim any\
+liability to You for claims brought by any other entity based on\
+infringement of intellectual property rights or otherwise. As a\
+condition to exercising the rights and licenses granted hereunder, You\
+hereby assume sole responsibility to secure any other intellectual\
+property rights needed, if any. For example, if a third party patent\
+license is required to allow You to distribute the Covered Code, it is\
+Your responsibility to acquire that license before distributing the\
+Covered Code.\
+\
+3. Your Grants. In consideration of, and as a condition to, the\
+licenses granted to You under this License, You hereby grant to any\
+person or entity receiving or distributing Covered Code under this\
+License a non-exclusive, royalty-free, perpetual, irrevocable license,\
+under Your Applicable Patent Rights and other intellectual property\
+rights (other than patent) owned or controlled by You, to use,\
+reproduce, display, perform, modify, sublicense, distribute and\
+Externally Deploy Your Modifications of the same scope and extent as\
+Apple's licenses under Sections 2.1 and 2.2 above.\
+\
+4. Larger Works. You may create a Larger Work by combining Covered\
+Code with other code not governed by the terms of this License and\
+distribute the Larger Work as a single product. In each such instance,\
+You must make sure the requirements of this License are fulfilled for\
+the Covered Code or any portion thereof.\
+\
+5. Limitations on Patent License. Except as expressly stated in\
+Section 2, no other patent rights, express or implied, are granted by\
+Apple herein. Modifications and/or Larger Works may require additional\
+patent licenses from Apple which Apple may grant in its sole\
+discretion.\
+\
+6. Additional Terms. You may choose to offer, and to charge a fee for,\
+warranty, support, indemnity or liability obligations and/or other\
+rights consistent with the scope of the license granted herein\
+("Additional Terms") to one or more recipients of Covered Code.\
+However, You may do so only on Your own behalf and as Your sole\
+responsibility, and not on behalf of Apple or any Contributor. You\
+must obtain the recipient's agreement that any such Additional Terms\
+are offered by You alone, and You hereby agree to indemnify, defend\
+and hold Apple and every Contributor harmless for any liability\
+incurred by or claims asserted against Apple or such Contributor by\
+reason of any such Additional Terms.\
+\
+7. Versions of the License. Apple may publish revised and/or new\
+versions of this License from time to time. Each version will be given\
+a distinguishing version number. Once Original Code has been published\
+under a particular version of this License, You may continue to use it\
+under the terms of that version. You may also choose to use such\
+Original Code under the terms of any subsequent version of this\
+License published by Apple. No one other than Apple has the right to\
+modify the terms applicable to Covered Code created under this\
+License.\
+\
+8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in\
+part pre-release, untested, or not fully tested works. The Covered\
+Code may contain errors that could cause failures or loss of data, and\
+may be incomplete or contain inaccuracies. You expressly acknowledge\
+and agree that use of the Covered Code, or any portion thereof, is at\
+Your sole and entire risk. THE COVERED CODE IS PROVIDED "AS IS" AND\
+WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND\
+APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" FOR THE\
+PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM\
+ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT\
+NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF\
+MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR\
+PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD\
+PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST\
+INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE\
+FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS,\
+THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR\
+ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO\
+ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE\
+AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY.\
+You acknowledge that the Covered Code is not intended for use in the\
+operation of nuclear facilities, aircraft navigation, communication\
+systems, or air traffic control machines in which case the failure of\
+the Covered Code could lead to death, personal injury, or severe\
+physical or environmental damage.\
+\
+9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO\
+EVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL,\
+SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING\
+TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR\
+ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY,\
+TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF\
+APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\
+DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY\
+REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF\
+INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY\
+TO YOU. In no event shall Apple's total liability to You for all\
+damages (other than as may be required by applicable law) under this\
+License exceed the amount of fifty dollars ($50.00).\
+\
+10. Trademarks. This License does not grant any rights to use the\
+trademarks or trade names "Apple", "Apple Computer", "Mac", "Mac OS",\
+"QuickTime", "QuickTime Streaming Server" or any other trademarks,\
+service marks, logos or trade names belonging to Apple (collectively\
+"Apple Marks") or to any trademark, service mark, logo or trade name\
+belonging to any Contributor. You agree not to use any Apple Marks in\
+or as part of the name of products derived from the Original Code or\
+to endorse or promote products derived from the Original Code other\
+than as expressly permitted by and in strict compliance at all times\
+with Apple's third party trademark usage guidelines which are posted\
+at http://www.apple.com/legal/guidelinesfor3rdparties.html.\
+\
+11. Ownership. Subject to the licenses granted under this License,\
+each Contributor retains all rights, title and interest in and to any\
+Modifications made by such Contributor. Apple retains all rights,\
+title and interest in and to the Original Code and any Modifications\
+made by or on behalf of Apple ("Apple Modifications"), and such Apple\
+Modifications will not be automatically subject to this License. Apple\
+may, at its sole discretion, choose to license such Apple\
+Modifications under this License, or on different terms from those\
+contained in this License or may choose not to license them at all.\
+\
+12. Termination.\
+\
+12.1 Termination. This License and the rights granted hereunder will\
+terminate:\
+\
+(a) automatically without notice from Apple if You fail to comply with\
+any term(s) of this License and fail to cure such breach within 30\
+days of becoming aware of such breach;\
+\
+(b) immediately in the event of the circumstances described in Section\
+13.5(b); or\
+\
+(c) automatically without notice from Apple if You, at any time during\
+the term of this License, commence an action for patent infringement\
+against Apple; provided that Apple did not first commence\
+an action for patent infringement against You in that instance.\
+\
+12.2 Effect of Termination. Upon termination, You agree to immediately\
+stop any further use, reproduction, modification, sublicensing and\
+distribution of the Covered Code. All sublicenses to the Covered Code\
+which have been properly granted prior to termination shall survive\
+any termination of this License. Provisions which, by their nature,\
+should remain in effect beyond the termination of this License shall\
+survive, including but not limited to Sections 3, 5, 8, 9, 10, 11,\
+12.2 and 13. No party will be liable to any other for compensation,\
+indemnity or damages of any sort solely as a result of terminating\
+this License in accordance with its terms, and termination of this\
+License will be without prejudice to any other right or remedy of\
+any party.\
+\
+13. Miscellaneous.\
+\
+13.1 Government End Users. The Covered Code is a "commercial item" as\
+defined in FAR 2.101. Government software and technical data rights in\
+the Covered Code include only those rights customarily provided to the\
+public as defined in this License. This customary commercial license\
+in technical data and software is provided in accordance with FAR\
+12.211 (Technical Data) and 12.212 (Computer Software) and, for\
+Department of Defense purchases, DFAR 252.227-7015 (Technical Data --\
+Commercial Items) and 227.7202-3 (Rights in Commercial Computer\
+Software or Computer Software Documentation). Accordingly, all U.S.\
+Government End Users acquire Covered Code with only those rights set\
+forth herein.\
+\
+13.2 Relationship of Parties. This License will not be construed as\
+creating an agency, partnership, joint venture or any other form of\
+legal association between or among You, Apple or any Contributor, and\
+You will not represent to the contrary, whether expressly, by\
+implication, appearance or otherwise.\
+\
+13.3 Independent Development. Nothing in this License will impair\
+Apple's right to acquire, license, develop, have others develop for\
+it, market and/or distribute technology or products that perform the\
+same or similar functions as, or otherwise compete with,\
+Modifications, Larger Works, technology or products that You may\
+develop, produce, market or distribute.\
+\
+13.4 Waiver; Construction. Failure by Apple or any Contributor to\
+enforce any provision of this License will not be deemed a waiver of\
+future enforcement of that or any other provision. Any law or\
+regulation which provides that the language of a contract shall be\
+construed against the drafter will not apply to this License.\
+\
+13.5 Severability. (a) If for any reason a court of competent\
+jurisdiction finds any provision of this License, or portion thereof,\
+to be unenforceable, that provision of the License will be enforced to\
+the maximum extent permissible so as to effect the economic benefits\
+and intent of the parties, and the remainder of this License will\
+continue in full force and effect. (b) Notwithstanding the foregoing,\
+if applicable law prohibits or restricts You from fully and/or\
+specifically complying with Sections 2 and/or 3 or prevents the\
+enforceability of either of those Sections, this License will\
+immediately terminate and You must immediately discontinue any use of\
+the Covered Code and destroy all copies of it that are in your\
+possession or control.\
+\
+13.6 Dispute Resolution. Any litigation or other dispute resolution\
+between You and Apple relating to this License shall take place in the\
+Northern District of California, and You and Apple hereby consent to\
+the personal jurisdiction of, and venue in, the state and federal\
+courts within that District with respect to this License. The\
+application of the United Nations Convention on Contracts for the\
+International Sale of Goods is expressly excluded.\
+\
+13.7 Entire Agreement; Governing Law. This License constitutes the\
+entire agreement between the parties with respect to the subject\
+matter hereof. This License shall be governed by the laws of the\
+United States and the State of California, except that body of\
+California law concerning conflicts of law.\
+\
+Where You are located in the province of Quebec, Canada, the following\
+clause applies: The parties hereby confirm that they have requested\
+that this License and all related documents be drafted in English. Les\
+parties ont exige que le present contrat et tous les documents\
+connexes soient rediges en anglais.\
+\
+EXHIBIT A.\
+\
+"Portions Copyright (c) 1999-2003 Apple Computer, Inc. All Rights\
+Reserved.\
+\
+This file contains Original Code and/or Modifications of Original Code\
+as defined in and that are subject to the Apple Public Source License\
+Version 2.0 (the 'License'). You may not use this file except in\
+compliance with the License. Please obtain a copy of the License at\
+http://www.opensource.apple.com/apsl/ and read it before using this\
+file.\
+\
+The Original Code and all software distributed under the License are\
+distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER\
+EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,\
+INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,\
+FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.\
+Please see the License for the specific language governing rights and\
+limitations under the License." }
\ No newline at end of file
Index: trunk/PackageBuilder/package/Resources/Bulgarian.lproj/Description.html
===================================================================
--- trunk/PackageBuilder/package/Resources/Bulgarian.lproj/Description.html (revision 0)
+++ trunk/PackageBuilder/package/Resources/Bulgarian.lproj/Description.html (revision 340)
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+Chameleon е комбинация от разбични boot loader компоненти.
Базиран е на fake EFI изпълнението на Дейвид Ейлиът добавено към проекта boot-132 на Apple.
Chameleon е разширен със следните ключови функции:
+
+Нови функции в Chameleon 2.0
+
+ - Напълно управляем графичен интерфейс за добавяне на живи цветове към Darwin Bootloader.
+ - Boot-ва retail DVD-та чрез директно зареждане на ramdisk image без помоща на допълнителни програми.
+ - Хибернация.
+ - SMBIOS заместване, за да бъдат модифицирани оригиналните SMBIOS стойности.
+ - DSDT заместване, за да бъде използвано модифицирано DSDT, което решава множество проблеми.
+
+ - Вграждане на особеностите на различни хардуерни устройства посредством device-properties стрингове.
+ - Хибридни boot0 / boot1h за MBR и GPT разделени дискове..
+ - Автоматично разпознаване на FSB за новите AMD процесори.
+ - Поддръжка на Apple Software RAID..
+
+За повече информация посетете: http://chameleon.osx86.hu
+
+
+