Debian Codegraph @

arch/makedmg.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 VERSION="2.6"
4 applicationName="CheeseCutter.app"
5 backgroundPictureName="background.png"
6 source="dist"
7 title="CheeseCutter ${VERSION}"
8 size=20000
9 finalDMGName="CheeseCutter_${VERSION}.dmg"
10
11 mkdirscip-shell system . . mkdir. "${source}"
12 cpscip-shell system . . cp. -r "${applicationName}" "${source}"
13
14 hdiutil create -srcfolder "${source}" -volname "${title}" -fs HFS+ \
15 -fsargs "-c c=64,a=16,e=16" -format UDRW -size ${size}k pack.temp.dmg
16 device=$(hdiutil attach -readwrite -noverify -noautoopen "pack.temp.dmg" | \
17 egrep '^/dev/' | sed 1q | awk '{print $1}')
18 sleepscip-shell system . . sleep. 5
19 mkdirscip-shell system . . mkdir. /Volumes/"${title}"/.background
20 cpscip-shell system . . cp. arch/background.png /Volumes/"${title}"/.background
21 cpscip-shell system . . cp. -r tunes README COPYING Changelog /Volumes/"${title}"/
22
23 pushd /Volumes/"${title}"
24 lnscip-shell system . . ln. -s /Applicationsscip-shell filesystem . . `/Applications`.
25 popd
26
27 echoscip-shell system . . echo. '
28 tell application "Finder"
29 tell disk "'${title}'"
30 open
31 set current view of container window to icon view
32 set toolbar visible of container window to false
33 set statusbar visible of container window to false
34 set the bounds of container window to {400, 100, 885, 430}
35 set theViewOptions to the icon view options of container window
36 set arrangement of theViewOptions to not arranged
37 set icon size of theViewOptions to 72
38 set background picture of theViewOptions to file ".background:'${backgroundPictureName}'"
39 delay 1
40 set position of item "'${applicationName}'" of container window to {100, 100}
41 set position of item "Applications" of container window to {375, 100}
42 update without registering applications
43 close
44 open
45 delay 5
46 eject
47 end tell
48 end tell
49 ' | osascript
50
51 chmodscip-shell system . . chmod. -Rf go-w /Volumes/"${title}"
52 syncscip-shell system . . sync.
53 syncscip-shell system . . sync.
54 hdiutil detach ${device}
55 hdiutil convert pack.temp.dmg -format UDZO -imagekey zlib-level=9 -o ${finalDMGName}
56 rmscip-shell system . . rm. pack.temp.dmg