Chameleon

Chameleon Svn Source Tree

Root/branches/azimutz/trunkGraphicsEnablerModules/package/Scripts/Post/postinstall.sh

  • Property svn:executable set to *
1#!/bin/bash
2
3temp="/tmp/Chameleon"
4
5# source com.apple.boot.plist
6if ! [ -f "${2}/.Chameleon/Extra/com.apple.Boot.plist" ]; then
7if [ -f "${2}/Library/Preferences/SystemConfiguration/com.apple.Boot.plist" ]; then
8cp -f "${2}/Library/Preferences/SystemConfiguration/com.apple.Boot.plist" "${2}/.Chameleon/Extra"
9fi
10fi
11
12# fix kext permissions
13find "${2}/.Chameleon/Extra/Extensions" -type f -exec chmod 644 {} \;
14find "${2}/.Chameleon/Extra/Extensions" -type d -exec chmod 755 {} \;
15chown -R 0:0 "${2}/.Chameleon/Extra/Extensions"
16
17# build mkext for extras
18[ -d "${temp}" ] && rm -R -f "${temp}"
19mkdir -p "${temp}/Extensions"
20ditto --noextattr --noqtn --arch i386 "${2}/.Chameleon/Extra/Extensions" "${temp}/Extensions"
21find "${temp}" -type f -exec chmod 644 {} \;
22find "${temp}" -type d -exec chmod 755 {} \;
23chown -R 0:0 "${temp}"
24kextcache -m "${temp}/Extensions.mkext" "${temp}/Extensions"
25cp -f "${temp}/Extensions.mkext" "${2}/.Chameleon/Extra"
26rm -R -f "${temp}"
27
28# remove link for extras install
29unlink "${2}/.Chameleon"
30
31# umount efi partition
32if [ -d /Volumes/EFI ]; then
33umount -f /Volumes/EFI
34rm -R -f /Volumes/EFI
35fi
36
37exit 0

Archive Download this file

Revision: 1017