##// END OF EJS Templates
Fix Linux package generation script...
Titta Heikkala -
r2645:f49860f63006
parent child
Show More
@@ -1,65 +1,65
1 #!/bin/sh
1 #!/bin/sh
2
2
3 CHARTS_TEMP_DIR=temp_dir
3 CHARTS_TEMP_DIR=temp_dir
4 CHARTS_TEMP_DIR_FULL=../$CHARTS_TEMP_DIR
4 CHARTS_TEMP_DIR_FULL=../$CHARTS_TEMP_DIR
5
5
6 if [ "$1" = "" ]
6 if [ "$1" = "" ]
7 then
7 then
8 echo Usage: $0 version [branch or SHA]
8 echo Usage: $0 version [branch or SHA]
9 echo Branch defaults to master.
9 echo Branch defaults to master.
10 echo Creates the package in parent dir.
10 echo Creates the package in parent dir.
11 echo A temporary dir $CHARTS_TEMP_DIR_FULL is utilized for intermediate steps.
11 echo A temporary dir $CHARTS_TEMP_DIR_FULL is utilized for intermediate steps.
12 fi
12 fi
13
13
14 if [ "$2" = "" ]
14 if [ "$2" = "" ]
15 then
15 then
16 CHARTS_BRANCH=origin/master
16 CHARTS_BRANCH=origin/master
17 else
17 else
18 CHARTS_BRANCH=$2
18 CHARTS_BRANCH=$2
19 fi
19 fi
20
20
21 CHARTS_VERSION=$1
21 CHARTS_VERSION=$1
22 CHARTS_CURRENT_DIR=$PWD
22 CHARTS_CURRENT_DIR=$PWD
23 CHARTS_BUILD_DIR=$CHARTS_TEMP_DIR_FULL/tempbuild
23 CHARTS_BUILD_DIR=$CHARTS_TEMP_DIR_FULL/tempbuild
24 CHARTS_PACKAGE_UNTAR_NAME=qtcharts_$CHARTS_VERSION
24 CHARTS_PACKAGE_UNTAR_NAME=qtcharts-$CHARTS_VERSION
25 CHARTS_PACKAGE_UNTAR_DIR=$CHARTS_TEMP_DIR_FULL/$CHARTS_PACKAGE_UNTAR_NAME
25 CHARTS_PACKAGE_UNTAR_DIR=$CHARTS_TEMP_DIR_FULL/$CHARTS_PACKAGE_UNTAR_NAME
26 CHARTS_TEMP_TAR=qtcharts_temp_$CHARTS_VERSION.tar
26 CHARTS_TEMP_TAR=qtcharts_temp_$CHARTS_VERSION.tar
27 CHARTS_TEMP_TAR_FULL=$CHARTS_TEMP_DIR_FULL/$CHARTS_TEMP_TAR
27 CHARTS_TEMP_TAR_FULL=$CHARTS_TEMP_DIR_FULL/$CHARTS_TEMP_TAR
28 CHARTS_FINAL_TAR=$CHARTS_CURRENT_DIR/../qt-enterprise-charts-src-$CHARTS_VERSION.tar
28 CHARTS_FINAL_TAR=$CHARTS_CURRENT_DIR/../qt-enterprise-charts-src-$CHARTS_VERSION.tar
29
29
30 echo Exporting $CHARTS_BRANCH to $CHARTS_TEMP_TAR_FULL...
30 echo Exporting $CHARTS_BRANCH to $CHARTS_TEMP_TAR_FULL...
31 rm -r -f $CHARTS_TEMP_DIR_FULL 2> /dev/null
31 rm -r -f $CHARTS_TEMP_DIR_FULL 2> /dev/null
32 mkdir -p $CHARTS_TEMP_DIR_FULL 2> /dev/null
32 mkdir -p $CHARTS_TEMP_DIR_FULL 2> /dev/null
33 git fetch
33 git fetch
34 git archive --format tar --output $CHARTS_TEMP_TAR_FULL $CHARTS_BRANCH
34 git archive --format tar --output $CHARTS_TEMP_TAR_FULL $CHARTS_BRANCH
35
35
36 echo Unpacking $CHARTS_TEMP_TAR_FULL to $CHARTS_PACKAGE_UNTAR_DIR and $CHARTS_BUILD_DIR...
36 echo Unpacking $CHARTS_TEMP_TAR_FULL to $CHARTS_PACKAGE_UNTAR_DIR and $CHARTS_BUILD_DIR...
37 mkdir -p $CHARTS_PACKAGE_UNTAR_DIR 2> /dev/null
37 mkdir -p $CHARTS_PACKAGE_UNTAR_DIR 2> /dev/null
38 mkdir -p $CHARTS_BUILD_DIR 2> /dev/null
38 mkdir -p $CHARTS_BUILD_DIR 2> /dev/null
39 tar -xvf $CHARTS_TEMP_TAR_FULL -C $CHARTS_PACKAGE_UNTAR_DIR > /dev/null
39 tar -xvf $CHARTS_TEMP_TAR_FULL -C $CHARTS_PACKAGE_UNTAR_DIR > /dev/null
40 tar -xvf $CHARTS_TEMP_TAR_FULL -C $CHARTS_BUILD_DIR > /dev/null
40 tar -xvf $CHARTS_TEMP_TAR_FULL -C $CHARTS_BUILD_DIR > /dev/null
41 #Workaround for git archive bug
41 #Workaround for git archive bug
42 rm -r -f $CHARTS_PACKAGE_UNTAR_DIR/tools
42 rm -r -f $CHARTS_PACKAGE_UNTAR_DIR/tools
43 rm -r -f $CHARTS_PACKAGE_UNTAR_DIR/tests
43 rm -r -f $CHARTS_PACKAGE_UNTAR_DIR/tests
44 rm -r -f $CHARTS_BUILD_DIR/tools
44 rm -r -f $CHARTS_BUILD_DIR/tools
45 rm -r -f $CHARTS_BUILD_DIR/tests
45 rm -r -f $CHARTS_BUILD_DIR/tests
46
46
47 echo Generating includes, mkspecs, and docs in $CHARTS_BUILD_DIR...
47 echo Generating includes, mkspecs, and docs in $CHARTS_BUILD_DIR...
48 cd $CHARTS_BUILD_DIR
48 cd $CHARTS_BUILD_DIR
49 mkdir -p .git 2> /dev/null
49 mkdir -p .git 2> /dev/null
50 qmake > /dev/null 2> /dev/null
50 qmake > /dev/null 2> /dev/null
51 make docs > /dev/null 2> /dev/null
51 make docs > /dev/null 2> /dev/null
52 cd $CHARTS_CURRENT_DIR
52 cd $CHARTS_CURRENT_DIR
53
53
54 echo Copying generated files to $CHARTS_PACKAGE_UNTAR_DIR
54 echo Copying generated files to $CHARTS_PACKAGE_UNTAR_DIR
55 cp -r $CHARTS_BUILD_DIR/doc/qch $CHARTS_PACKAGE_UNTAR_DIR/doc/qch
55 cp -r $CHARTS_BUILD_DIR/doc/qch $CHARTS_PACKAGE_UNTAR_DIR/doc/qch
56 cp -r $CHARTS_BUILD_DIR/doc/html $CHARTS_PACKAGE_UNTAR_DIR/doc/html
56 cp -r $CHARTS_BUILD_DIR/doc/html $CHARTS_PACKAGE_UNTAR_DIR/doc/html
57
57
58 echo Repackaging $CHARTS_PACKAGE_UNTAR_DIR to $CHARTS_FINAL_TAR
58 echo Repackaging $CHARTS_PACKAGE_UNTAR_DIR to $CHARTS_FINAL_TAR
59 rm $CHARTS_FINAL_TAR 2> /dev/null
59 rm $CHARTS_FINAL_TAR 2> /dev/null
60 cd $CHARTS_TEMP_DIR_FULL
60 cd $CHARTS_TEMP_DIR_FULL
61 tar -cvf $CHARTS_FINAL_TAR $CHARTS_PACKAGE_UNTAR_NAME >/dev/null
61 tar -cvf $CHARTS_FINAL_TAR $CHARTS_PACKAGE_UNTAR_NAME >/dev/null
62 gzip $CHARTS_FINAL_TAR >/dev/null
62 gzip $CHARTS_FINAL_TAR >/dev/null
63 cd $CHARTS_CURRENT_DIR
63 cd $CHARTS_CURRENT_DIR
64
64
65 exit 0
65 exit 0
General Comments 0
You need to be logged in to leave comments. Login now