File: deploy_linux_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 (41 lines) | stat: -rwxr-xr-x 1,080 bytes parent folder | download | duplicates (4)
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
39
40
41
#!/bin/sh
# Script to deploy the linux bundle created by cpack -- I am sure
# that the process can be automated from within CMake, but this
# method works for me.
#
echo "Preparing $1.tar.gz for deployment..."
echo "Deleting old directory"
topdir=$PWD
rm -rf $1
echo "Unpacking TGZ"
tar xfz $1.tar.gz
echo "Building package"
cd $1
mkdir Contents
mkdir Contents/lib
mkdir Contents/Resources
mv share/*/* Contents/Resources/.
rm -rf share
mv bin Contents/.
cp /usr/local/lib/libQtCore.so.4 Contents/lib/.
cp /usr/local/lib/libQtGui.so.4 Contents/lib/.
cp /usr/local/lib/libQtNetwork.so.4 Contents/lib/.
cp /usr/local/lib/libQtOpenGL.so.4 Contents/lib/.
cp /usr/local/lib/libQtXml.so.4 Contents/lib/.
cp /usr/local/lib/libQtSvg.so.4 Contents/lib/.
cp -r /usr/local/plugins Contents/
rm `find . -name '*.debug'`
cd Contents/bin
mv FreeMat FreeMat.bin
cat >FreeMat <<END
#!/bin/sh
LD_LIBRARY_PATH=$PWD/../lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
$PWD/FreeMat.bin
END
chmod +x FreeMat
ln -s FreeMat freemat
cd ../..
ln -s Contents/bin/FreeMat FreeMat
cd $topdir
tar cfz $1.tar.gz $1