Chameleon

Chameleon Svn Source Tree

Root/branches/rewrite/package/Scripts/Post/postinstall.sh

  • Property svn:executable set to *
Source at commit 1166 created 13 years 10 days ago.
By meklort, Fixed recent Makefile changes. Please do not use /Users/evan/SourceCode/tmp/chameleon/trunk or VPATH. the *only* time you should use /Users/evan/SourceCode/tmp/chameleon/trunk is when setting the SRCROOT variable. Also note that very soon make pkg is going to be removed. The pkg build script in trunk is very out of date. Instead please use the package maker at http://forge.voodooprojects.org/p/chameleonApplications/. Once this is ready for trunk it will be merged.
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: 1166