author | Mike Kinghan <mikek@symbian.org> |
Mon, 21 Jun 2010 17:57:23 +0100 | |
changeset 589 | 851206cea67b |
parent 428 | b794862a1518 |
permissions | -rwxr-xr-x |
3 | 1 |
#!/bin/bash |
2 |
||
428
b794862a1518
Update linux installer maker for new license.txt and HTML release notes.
Jon Chatten
parents:
9
diff
changeset
|
3 |
# Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 | 4 |
# All rights reserved. |
5 |
# This component and the accompanying materials are made available |
|
6 |
# under the terms of the License "Eclipse Public License v1.0" |
|
7 |
# which accompanies this distribution, and is available |
|
8 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 |
# |
|
10 |
# Initial Contributors: |
|
11 |
# Nokia Corporation - initial contribution. |
|
12 |
# |
|
13 |
# Contributors: |
|
14 |
# |
|
15 |
# Description: |
|
16 |
# Package into a linux .run file |
|
17 |
# |
|
18 |
# |
|
19 |
||
20 |
getopts 's' packopt |
|
21 |
||
22 |
||
23 |
export packtype=binary |
|
24 |
if [[ "$packopt" == "s" ]]; then |
|
25 |
packtype=source |
|
26 |
fi |
|
27 |
||
28 |
echo "Raptor packager for Linux" |
|
9 | 29 |
export PACKAGER_HOME="$PWD" |
3 | 30 |
|
31 |
echo "SBS_HOME is $SBS_HOME - this is the version that will be packaged." |
|
32 |
||
33 |
export FULLVERSION=`$SBS_HOME/bin/sbs -v` # this also generates all the pyc files |
|
34 |
export VERSION=`echo "$FULLVERSION" | sed 's#.*sbs version *\([^ ]*\).*#\1#'` |
|
35 |
||
36 |
if [ -z "$VERSION" ]; then |
|
37 |
echo "Version could not be automatically determined - check that SBS_HOME is set correctly" 1>&2 |
|
38 |
exit 1 |
|
39 |
else |
|
40 |
echo "Packaging version $FULLVERSION" |
|
41 |
fi |
|
42 |
||
43 |
HOSTPLATFORM_DIR=$($SBS_HOME/bin/gethost.sh -d) |
|
44 |
||
45 |
if [[ "$packtype" == "source" ]]; then |
|
46 |
HOSTPLATFORM_DIR="linux_source" |
|
47 |
fi |
|
48 |
||
49 |
||
50 |
export DIRNAME=sbs-$VERSION-$HOSTPLATFORM_DIR |
|
51 |
export TMPSBS=/tmp/$DIRNAME |
|
52 |
if [ -d "$TMPSBS" ]; then |
|
53 |
rm -rf "$TMPSBS" |
|
54 |
fi |
|
55 |
set -x |
|
56 |
mkdir -p "$TMPSBS" && |
|
57 |
( |
|
58 |
BINARIES="$HOSTPLATFORM_DIR" |
|
59 |
if [[ "$packtype" == "source" ]]; then |
|
60 |
BINARIES="" |
|
61 |
fi |
|
62 |
||
63 |
||
428
b794862a1518
Update linux installer maker for new license.txt and HTML release notes.
Jon Chatten
parents:
9
diff
changeset
|
64 |
cd $SBS_HOME && find license.txt RELEASE-NOTES.html bin lib notes $BINARIES python test schema util | |
3 | 65 |
grep -v "$TMPSBS"'/python/\.py$' | |
66 |
grep -v 'flm/test' | |
|
67 |
grep -v 'util/build' | |
|
68 |
grep -v 'test/epocroot/epoc32/build' | |
|
69 |
grep -v '~$' | cpio -o --quiet 2>/dev/null |
|
70 |
) | ( cd "$TMPSBS" && cpio -i --make-directories --quiet >/dev/null 2>&1) |
|
71 |
||
72 |
# store the version number |
|
73 |
echo "FULLVERSION=\"$FULLVERSION\"" > $TMPSBS/.version |
|
74 |
echo "VERSION=\"$VERSION\"" >> $TMPSBS/.version |
|
75 |
||
76 |
if [[ "$packtype" == "binary" ]]; then |
|
77 |
chmod a+x $TMPSBS/bin/* $TMPSBS/util/$HOSTPLATFORM_DIR/bin/* $TMPSBS/util/$HOSTPLATFORM_DIR/python262/bin/* |
|
78 |
chmod a+x $TMPSBS/util/pvm3/bin/LINUX/* |
|
79 |
chmod a+x $TMPSBS/util/$HOSTPLATFORM_DIR/cw_build470msl19/release/Symbian_Tools/Command_Line_Tools/* |
|
80 |
fi |
|
81 |
||
82 |
cd $TMPSBS/.. && bash "$PACKAGER_HOME"/makeself.sh $DIRNAME $DIRNAME.run "$FULLVERSION\n" ./bin/install_raptor.sh |
|
83 |