|
Revision 434, 1.0 kB
(checked in by gbooker, 2 years ago)
|
Fixed the build script to work with the new prefpane name.
|
| Line | |
|---|
| 1 |
#!/bin/sh -v |
|---|
| 2 |
PATH=$PATH:/usr/local/bin:/usr/bin:/sw/bin:/opt/local/bin |
|---|
| 3 |
|
|---|
| 4 |
function compressAndInsertComponent(){ |
|---|
| 5 |
itemName="$1" |
|---|
| 6 |
itemLength=${#itemName} |
|---|
| 7 |
item=${itemName:0:$itemLength-10} |
|---|
| 8 |
if [[ -d $itemName ]] ; then |
|---|
| 9 |
ditto -c -k --rsrc --keepParent "$itemName" "${item}.zip" |
|---|
| 10 |
cp "${item}.zip" "$2" |
|---|
| 11 |
fi |
|---|
| 12 |
} |
|---|
| 13 |
|
|---|
| 14 |
function compressComponents(){ |
|---|
| 15 |
mkdir -p "$2" |
|---|
| 16 |
cd $1 |
|---|
| 17 |
for itemName in *.component ; do |
|---|
| 18 |
compressAndInsertComponent $itemName $2 |
|---|
| 19 |
done |
|---|
| 20 |
} |
|---|
| 21 |
|
|---|
| 22 |
cd "${BUILT_PRODUCTS_DIR}" |
|---|
| 23 |
mkdir -p "${BUILT_PRODUCTS_DIR}/Perian.prefPane/Contents/Resources/Components/" |
|---|
| 24 |
compressAndInsertComponent "Perian.component" "${BUILT_PRODUCTS_DIR}/Perian.prefPane/Contents/Resources/Components/" |
|---|
| 25 |
if [[ -d "${BUILT_PRODUCTS_DIR}/CoreAudio" ]] ; then |
|---|
| 26 |
compressComponents "${BUILT_PRODUCTS_DIR}/CoreAudio" "${BUILT_PRODUCTS_DIR}/Perian.prefPane/Contents/Resources/Components/CoreAudio" |
|---|
| 27 |
fi |
|---|
| 28 |
if [[ -d "${BUILT_PRODUCTS_DIR}/QuickTime" ]] ; then |
|---|
| 29 |
compressComponents "${BUILT_PRODUCTS_DIR}/QuickTime" "${BUILT_PRODUCTS_DIR}/Perian.prefPane/Contents/Resources/Components/QuickTime" |
|---|
| 30 |
fi |
|---|