[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Convert make dist-osx to new file output naming scheme
Update of /home/or/cvsroot/tor/contrib/osx
In directory moria:/tmp/cvs-serv30813/contrib/osx
Modified Files:
package.sh
Log Message:
Convert make dist-osx to new file output naming scheme
Index: package.sh
===================================================================
RCS file: /home/or/cvsroot/tor/contrib/osx/package.sh,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -p -d -r1.12 -r1.13
--- package.sh 19 Feb 2006 15:54:30 -0000 1.12
+++ package.sh 20 Feb 2006 05:20:27 -0000 1.13
@@ -25,12 +25,31 @@ PRIVOXY_PKG_ZIP=~/tmp/privoxyosx_setup_3
# 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 Bundle.dmg"
+# Make sure VERSION is set, so we don't name the package "Tor--$OS-Bundle.dmg"
if [ "XX$VERSION" = 'XX' ]; then
echo "VERSION not set."
exit 1
fi
+## Determine OSX Version
+# map version to name
+if [ -x /usr/bin/sw_vers ]; then
+# This is poor, yet functional. We don't care about the 3rd number in
+# the OS version
+ OSVER=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 | cut -d"." -f1,2`
+ case "$OSVER" in
+ "10.5") OS="leopard";;
+ "10.4") OS="tiger";;
+ "10.3") OS="panther";;
+ "10.2") OS="jaguar";;
+ "10.1") OS="puma";;
+ "10.0") OS="cheetah";;
+ *) OS="unknown";;
+ esac
+else
+ OS="unknown"
+fi
+
# Where will we put our temporary files?
BUILD_DIR=/tmp/tor-osx-$$
# Path to PackageMaker app.
@@ -104,7 +123,7 @@ $PACKAGEMAKER -build
### 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\ Bundle.mpkg
+MPKG=$BUILD_DIR/output/Tor-$VERSION-$OS-Bundle.mpkg
mkdir -p "$MPKG/Contents/Resources"
echo -n "pmkrpkg1" > "$MPKG/Contents/PkgInfo"
cp contrib/osx/ReadMe.rtf "$MPKG/Contents/Resources"
@@ -130,7 +149,7 @@ cp LICENSE $BUILD_DIR/output/Tor\ Licens
DOC=$BUILD_DIR/output/Documents
mkdir $DOC
-cp doc/tor-doc.html doc/tor-doc.css $DOC
+cp doc/tor-doc.html doc/tor-doc.css doc/tor-doc-osx.html $DOC
cp AUTHORS $DOC/AUTHORS.txt
groff doc/tor.1 -T ps -m man | pstopdf - $DOC/tor-reference.pdf
groff doc/tor-resolve.1 -T ps -m man | pstopdf - $DOC/tor-resolve.pdf
@@ -144,10 +163,10 @@ cp ChangeLog $DOC/Advanced/ChangeLog.txt
find $BUILD_DIR/output -print0 | sudo xargs -0 chown root:wheel
-mv $BUILD_DIR/output "$BUILD_DIR/Tor $VERSION Bundle"
-rm -f "Tor $VERSION Bundle.dmg"
+mv $BUILD_DIR/output "$BUILD_DIR/Tor-$VERSION-$OS-Bundle"
+rm -f "Tor-$VERSION-$OS-Bundle.dmg"
USER="`whoami`"
-sudo hdiutil create -format UDZO -srcfolder "$BUILD_DIR/Tor $VERSION Bundle" "Tor $VERSION Bundle.dmg"
-sudo chown "$USER" "Tor $VERSION Bundle.dmg"
+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 rm -rf $BUILD_DIR