~ubuntu-branches/ubuntu/trusty/qgis/trusty

« back to all changes in this revision

Viewing changes to mac/extras/3-dmg.sh

  • Committer: Bazaar Package Importer
  • Author(s): Johan Van de Wauw
  • Date: 2010-07-11 20:23:24 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100711202324-5ktghxa7hracohmr
Tags: 1.4.0+12730-3ubuntu1
* Merge from Debian unstable (LP: #540941).
* Fix compilation issues with QT 4.7
* Add build-depends on libqt4-webkit-dev 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
#
 
4
# A bash script to create a dmg image file of the 
 
5
#            final application bundle
 
6
#              (c) Tim Sutton 2007
 
7
 
 
8
DMGNAME=QGISAlaskaUncompressed.dmg
 
9
COMPRESSEDDMGNAME=QGISAlaska.dmg
 
10
set -x
 
11
 
 
12
echo "Removing old dmg if it exists"
 
13
rm ~/Desktop/${DMGNAME}
 
14
rm ~/Desktop/${COMPRESSEDDMGNAME}
 
15
hdiutil create -size 300m -fs HFS+ -volname "QGISAlaska" ~/Desktop/${DMGNAME}
 
16
 
 
17
# Mount the disk image
 
18
hdiutil attach ~/Desktop/${DMGNAME}
 
19
 
 
20
# Obtain device information
 
21
DEVS=$(hdiutil attach ~/Desktop/${DMGNAME} | cut -f 1)
 
22
DEV=$(echo $DEVS | cut -f 1 -d ' ')
 
23
VOLUME=$(mount |grep ${DEV} | cut -f 3 -d ' ') 
 
24
 
 
25
# copy in the application bundle
 
26
cp -Rp /Applications/QGISAlaska.app ${VOLUME}/QGISAlaska.app
 
27
 
 
28
# copy in background image and folder settings for icon sizes etc
 
29
tar xvfz alaska_extra_dmg_files.tar.gz -C ${VOLUME} 
 
30
cp ../LICENSE ${VOLUME}/LICENSE.txt
 
31
 
 
32
# Unmount the disk image
 
33
hdiutil detach $DEV
 
34
 
 
35
# Convert the disk image to read-only
 
36
hdiutil convert ~/Desktop/${DMGNAME} \
 
37
  -format UDZO -o ~/Desktop/${COMPRESSEDDMGNAME}
 
38