aboutsummaryrefslogtreecommitdiffhomepage
path: root/build_tools
diff options
context:
space:
mode:
authorGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2016-05-25 17:11:02 +0000
committerGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2016-05-25 17:11:02 +0000
commit6d6f67ee67d35f19da21c48cfba194db107cebd5 (patch)
treea506b10f63861d2c96a5b0a463ab0635de744b85 /build_tools
parent987f7cafd31d8366d8012a67e309a50bb914b32b (diff)
make_pkg: use a temporary directory rather than just /tmp
Diffstat (limited to 'build_tools')
-rwxr-xr-xbuild_tools/make_pkg.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/build_tools/make_pkg.sh b/build_tools/make_pkg.sh
index 7bc7c2ee..91d2e7f7 100755
--- a/build_tools/make_pkg.sh
+++ b/build_tools/make_pkg.sh
@@ -15,20 +15,23 @@ echo "Version is $VERSION"
set -x
make distclean
-rm -Rf /tmp/fish_pkg
#Exit on error
set -e
-mkdir -p /tmp/fish_pkg/root /tmp/fish_pkg/intermediates /tmp/fish_pkg/dst
-xcodebuild install -scheme install_tree -configuration Release DSTROOT=/tmp/fish_pkg/root/
-pkgbuild --scripts build_tools/osx_package_scripts --root /tmp/fish_pkg/root/ --identifier 'com.ridiculousfish.fish-shell-pkg' --version "$VERSION" /tmp/fish_pkg/intermediates/fish.pkg
+PKGDIR=`mktemp -d`
-productbuild --package-path /tmp/fish_pkg/intermediates --distribution build_tools/osx_distribution.xml --resources build_tools/osx_package_resources/ ~/fish_built/fish-$VERSION.pkg
+mkdir -p $PKGDIR/root $PKGDIR/intermediates $PKGDIR/dst
+xcodebuild install -scheme install_tree -configuration Release DSTROOT=$PKGDIR/root/
+pkgbuild --scripts build_tools/osx_package_scripts --root $PKGDIR/root/ --identifier 'com.ridiculousfish.fish-shell-pkg' --version "$VERSION" $PKGDIR/intermediates/fish.pkg
+
+productbuild --package-path $PKGDIR/intermediates --distribution build_tools/osx_distribution.xml --resources build_tools/osx_package_resources/ ~/fish_built/fish-$VERSION.pkg
# Make the app
xcodebuild -scheme fish.app -configuration Release DSTROOT=/tmp/fish_app/ SYMROOT=DerivedData/fish/Build/Products
-rm -f ~/fish_built/fish.app.zip
+
cd DerivedData/fish/Build/Products/Release/
zip -r ~/fish_built/fish-$VERSION.app.zip fish.app
+
+rm -r $PKGDIR