summaryrefslogtreecommitdiff
path: root/contrib/osx/package.sh
diff options
context:
space:
mode:
authorAndrew Lewman <andrew@torproject.org>2006-07-18 04:37:43 +0000
committerAndrew Lewman <andrew@torproject.org>2006-07-18 04:37:43 +0000
commitcb32336e19dcf98946e2e8f95ab965f1aad1af72 (patch)
treea3b5401c18c5e35d2ade8aa25167a2d9b9389b42 /contrib/osx/package.sh
parente1f30a5f2171540854a382983a9a076d478604fb (diff)
downloadtor-cb32336e19dcf98946e2e8f95ab965f1aad1af72.tar.gz
tor-cb32336e19dcf98946e2e8f95ab965f1aad1af72.zip
Add the output of OSX arch into the package name in preparation for ppc
vs x86 packages. svn:r6788
Diffstat (limited to 'contrib/osx/package.sh')
-rw-r--r--contrib/osx/package.sh19
1 files changed, 13 insertions, 6 deletions
diff --git a/contrib/osx/package.sh b/contrib/osx/package.sh
index 0378346db7..9a85d12d03 100644
--- a/contrib/osx/package.sh
+++ b/contrib/osx/package.sh
@@ -25,12 +25,19 @@ PRIVOXY_PKG_ZIP=~/tmp/privoxyosx_setup_3.0.3.zip
# http://developer.apple.com/documentation/DeveloperTools/Conceptual/SoftwareDistribution/index.html
# man packagemaker
-# Make sure VERSION is set, so we don't name the package "Tor--$OS-Bundle.dmg"
+# Make sure VERSION is set, so we don't name the package
+# "Tor--$OS-$ARCH-Bundle.dmg"
if [ "XX$VERSION" = 'XX' ]; then
echo "VERSION not set."
exit 1
fi
+if [ -x /usr/bin/arch ]; then
+ ARCH=`/usr/bin/arch`
+else
+ ARCH="unknown"
+fi
+
## Determine OSX Version
# map version to name
if [ -x /usr/bin/sw_vers ]; then
@@ -151,7 +158,7 @@ fi
### Assemble the metapackage. Packagemaker won't buld metapackages from
# the command line, so we need to do it by hand.
-MPKG=$BUILD_DIR/output/Tor-$VERSION-$OS-Bundle.mpkg
+MPKG=$BUILD_DIR/output/Tor-$VERSION-$OS-$ARCH-Bundle.mpkg
mkdir -p "$MPKG/Contents/Resources"
echo -n "pmkrpkg1" > "$MPKG/Contents/PkgInfo"
cp contrib/osx/ReadMe.rtf "$MPKG/Contents/Resources"
@@ -178,10 +185,10 @@ cp LICENSE $BUILD_DIR/output/Tor\ License.txt
find $BUILD_DIR/output -print0 | sudo xargs -0 chown root:wheel
-mv $BUILD_DIR/output "$BUILD_DIR/Tor-$VERSION-$OS-Bundle"
-rm -f "Tor-$VERSION-$OS-Bundle.dmg"
+mv $BUILD_DIR/output "$BUILD_DIR/Tor-$VERSION-$OS-$ARCH-Bundle"
+rm -f "Tor-$VERSION-$OS-$ARCH-Bundle.dmg"
USER="`whoami`"
-sudo hdiutil create -format UDZO -srcfolder "$BUILD_DIR/Tor-$VERSION-$OS-Bundle" "Tor-$VERSION-$OS-Bundle.dmg"
-sudo chown "$USER" "Tor-$VERSION-$OS-Bundle.dmg"
+sudo hdiutil create -format UDZO -srcfolder "$BUILD_DIR/Tor-$VERSION-$OS-$ARCH-Bundle" "Tor-$VERSION-$OS-$ARCH-Bundle.dmg"
+sudo chown "$USER" "Tor-$VERSION-$OS-$ARCH-Bundle.dmg"
sudo rm -rf $BUILD_DIR