-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy_build_package.sh
executable file
·38 lines (28 loc) · 1.15 KB
/
my_build_package.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
#for ARCH in i386 x86_64; do
for ARCH in ppc; do
# remove old installers
rm -f Disk\ Image/*.pkg
#ARCH=$ARCH ./build.sh
GIT_VERSION=$(./git/usr/local/git/bin/git --version | sed 's/git version //')
PACKAGE_NAME="git-$GIT_VERSION-$ARCH-leopard"
echo $PACKAGE_NAME | pbcopy
echo "Git version is $GIT_VERSION"
rm -f Disk\ Image/*.pkg
#sudo
bash -c "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker --doc Git\ Installer.pmdoc/ -o Disk\ Image/$PACKAGE_NAME.pkg --title 'Git $GIT_VERSION $ARCH'"
UNCOMPRESSED_IMAGE_FILENAME="$PACKAGE_NAME.uncompressed.dmg"
IMAGE_FILENAME="$PACKAGE_NAME.dmg"
rm -f $UNCOMPRESSED_IMAGE_FILENAME $IMAGE_FILENAME
hdiutil create $UNCOMPRESSED_IMAGE_FILENAME -srcfolder "Disk Image" -volname "Git $GIT_VERSION $ARCH Leopard" -ov
hdiutil convert -format UDZO -o $IMAGE_FILENAME $UNCOMPRESSED_IMAGE_FILENAME
rm $UNCOMPRESSED_IMAGE_FILENAME
done
# echo "Testing the $ARCH installer..."
#
# . test_installer.sh
#
# echo "Git Installer $GIT_VERSION - OS X - Leopard - $ARCH" | pbcopy
# open "http://code.google.com/p/git-osx-installer/downloads/entry"
# sleep 1
# open "./"