File: deploy_bundle

package info (click to toggle)
freemat 4.2%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 141,800 kB
  • ctags: 14,082
  • sloc: ansic: 126,788; cpp: 62,046; python: 2,080; perl: 1,255; sh: 1,146; yacc: 1,019; lex: 239; makefile: 100
file content (35 lines) | stat: -rwxr-xr-x 1,205 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
# Script to deploy the mac bundle created by cpack -- I am sure 
# that the process can be automated, but I can't seem to figure
# out how.
#
echo "Preparing $1.dmg for deployment..."
echo "Mounting DMG"
hdiutil attach $1.dmg
echo "Erasing current app"
rm -rf FreeMat.app
echo "Copying app from DMG"
cp -R /Volumes/$1/FreeMat.app .
echo "Cleaning up app"
rm -rf FreeMat.app/Contents/Resources/bin/FreeMat
echo "Running QT deployment tool"
/Developer/Tools/Qt/macdeployqt FreeMat.app
echo "Unmounting Source DMG"
hdiutil detach /Volumes/$1
echo "Creating new DMG"
hdiutil create -size 150m -fs HFS+ -volname $2 $2Uncompressed.dmg
echo "Mounting new DMG"
DEVS=$(hdiutil attach $2Uncompressed.dmg | cut -f 1)
DEV=$(echo $DEVS | cut -f 1 -d ' ')
VOLUME=$(mount |grep ${DEV} | cut -f 3 -d ' ')
echo "Installing FreeMat"
cp FreeMat.app/Contents/Resources/bin/blas.ini FreeMat.app/Contents/MacOS/.
cp -Rp FreeMat.app ${VOLUME}/.
ln -s /Applications/ ${VOLUME}/Applications
cp FreeMat.app/Contents/Resources/help/pdf/*.pdf ${VOLUME}/.
echo "Unmounting DMG"
hdiutil detach $DEV
echo "Compressing DMG"
hdiutil convert $2Uncompressed.dmg -format UDBZ -o $2.dmg
rm -rf $2Uncompressed.dmg
rm -rf FreeMat.app