source: orange/install-scripts/linux/createOrangeDist.sh @ 3297:3b7dbd760646

Revision 3297:3b7dbd760646, 3.4 KB checked in by cvso <cvso@…>, 7 years ago (diff)

* empty log message *

Line 
1#!/bin/sh
2
3#    - pyd vedno ven, vse kar je v exclude.lst
4#    - parametri skripti: - ime fajla ki ga generiramo
5#             - tag ki ga uporabim za checkout
6#             - tip builda
7#    - poskrbeti da se stvari ne prepletajo pri buildu
8# 1. snapshot (TAG: HEAD - snapshot, <poljuben tag> - stable )
9# 2. genomics - vse iz 1. + modul iz CVSja Genomics v orange/OrangeWidgets/Genomics (numarray - error ce ga ni)
10#   - kar je v BCMonly.lst ne gre zraven
11# 3. BCM - vsi iz 2. + posebni fajli
12#    - vsi fajli ki so zlistani v orange/OrangeWidgets/Genomics/BCMonly.lst
13
14if [ $# -lt 4 ]; then
15    echo "Usage: ./build.sh <CVS tag> <output filename> <type of build> <version> <compile>"
16    exit 1
17fi
18
19TAG=$1
20OUT=$2
21REL=$3
22VER=$4
23COMPILE=$5
24
25# check which kind of package should build, default is 'normal'
26if [ $REL == "Genomics" ]; then
27    REL=1
28elif [ $REL == "genomics" ]; then
29    REL=1
30elif [ $REL == "GENOMICS" ]; then
31    REL=1
32elif [ $REL == "BCM" ]; then
33    REL=2
34elif [ $REL == "Bcm" ]; then
35    REL=2
36elif [ $REL == "bcm" ]; then
37    REL=2
38else
39    REL=0
40fi
41
42rm -rf orange
43
44echo -n "Checkouting Orange from CVS to orange..."
45cvs -d :pserver:cvs@estelle.fri.uni-lj.si:/CVS co -r $TAG -f -d orange orange > cvs.log 2>&1
46cd orange
47cvs -d :pserver:cvs@estelle.fri.uni-lj.si:/CVS co -r $TAG -f -d source source >> cvs.log 2>&1
48cvs -d :pserver:cvs@estelle.fri.uni-lj.si:/CVS co -r $TAG -f install-scripts/linux/setup.py >> cvs.log 2>&1
49mv install-scripts/linux/setup.py .
50cvs -d :pserver:cvs@estelle.fri.uni-lj.si:/CVS co -r $TAG -f install-scripts/linux/INSTALL.txt >> cvs.log 2>&1
51mv install-scripts/linux/INSTALL.txt .
52cvs -d :pserver:cvs@estelle.fri.uni-lj.si:/CVS co -r $TAG -f install-scripts/license.txt >> cvs.log 2>&1
53mv install-scripts/license.txt .
54rm -Rf install-scripts
55cd ..
56
57if [ ! $REL -eq 0 ]; then
58    if [ ! -e orange ]; then
59        mkdir orange
60    fi
61
62    if [ ! -e orange/OrangeWidgets ]; then
63        mkdir orange/OrangeWidgets
64    fi
65
66#    if [ ! -e orange/OrangeWidgets/Genomics ]; then
67#        mkdir orange/OrangeWidgets/Genomics
68#    fi
69
70    cd orange/OrangeWidgets
71    cvs -d :pserver:cvs@estelle.fri.uni-lj.si:/CVS co -r $TAG -f -d Genomics Genomics >> cvs.log 2>&1
72    cd ../..
73fi
74
75echo "done"
76# clean CVS co, all CVS directories, all .pyd and .dll files,...
77
78echo -n "Cleaning orange directory..."
79find orange -name CVS -type d -exec rm -rf {} \; > /dev/null  2>&1
80find orange -name '*.pyd' -type f -exec rm -rf {} \; > /dev/null  2>&1
81find orange -name '*.dll' -type f -exec rm -rf {} \; > /dev/null  2>&1
82# in every directory create __init__.py file, distutils demand
83#find orange -name '*' -type d -exec touch {}/__init__.py \;
84# clean everything out of exclude.lst file
85cat orange/exclude.lst | xargs rm -rf
86
87if [ $REL -eq 1 ]; then # cleanup of BCMonly.lst file
88    cat orange/OrangeWidgets/Genomics/BCMinclude.lst | xargs rm -rf
89fi
90echo "done"
91
92echo -n "Updating Orange version to Orange-$VER..."
93cat orange/setup.py | sed s/"OrangeVer=\"ADDVERSION\""/"OrangeVer=\"Orange-$VER\""/ > orange/new.py
94mv -f orange/new.py orange/setup.py
95echo "done"
96
97if [ $COMPILE -eq 1 ]; then
98    cd orange
99        if ! python setup.py compile > ../output.log 2>&1 ; then
100              exit 1;
101        fi
102        cd source
103        mkdir ../tmp_lib
104    mv ../*.so ../*.a ../tmp_lib/
105    make clean
106    mv ../tmp_lib/* ..
107    rm -rf ../tmp_lib
108    cd ../..
109fi
110
111echo -n "Packing orange to $OUT..."
112tar czpvf $OUT orange > packing.log 2>&1
113echo "done"
114
Note: See TracBrowser for help on using the repository browser.