source: orange/install-scripts/mac/fink-update-local.sh @ 10850:ba7a2fb100ab

Revision 10850:ba7a2fb100ab, 3.2 KB checked in by Ales Erjavec <ales.erjavec@…>, 2 years ago (diff)

Changed bioinformatics addon repo url.

  • Property exe set to *
Line 
1#!/bin/bash -e
2#
3# Update the local/main tree with the latest packages
4# from hg (needs write priviliges in FINK_ROOT/fink/dists/local/main/finkinfo
5#
6# Should be run as: sudo ./fink-updata-local.sh /work/dir /sources/dir
7#
8# $1 Work dir (where repositories will be coned and source packages will be build)
9# $2 Sources (where source packages will be copied and retrieved by fink).
10
11if [[ ! $1 || ! $2 ]]; then
12    echo "Need two args"
13    exit 1
14fi
15
16WORK_DIR=$1
17SOURCES_DIR=$2
18
19FORCE=true
20
21# First build all the source packages
22./build-source.sh https://bitbucket.org/biolab/orange orange tip $WORK_DIR Orange
23./build-source.sh https://bitbucket.org/biolab/orange-bioinformatics bioinformatics tip $WORK_DIR Orange-Bioinformatics
24./build-source.sh https://bitbucket.org/biolab/orange-addon-text text tip $WORK_DIR Orange-Text-Mining
25
26# Get versions from PKG-INFO files
27ORANGE_VERSION=`grep "^Version:" $WORK_DIR/Orange.egg-info/PKG-INFO | cut -d " " -f 2`
28BIOINFORMATICS_VERSION=`grep "^Version:" $WORK_DIR/Orange_Bioinformatics.egg-info/PKG-INFO | cut -d " " -f 2`
29TEXT_VERSION=`grep "^Version:" $WORK_DIR/Orange_Text_Mining.egg-info/PKG-INFO | cut -d " " -f 2`
30
31
32# Source filenames
33ORANGE_SOURCE="Orange-${ORANGE_VERSION}.tar.gz"
34BIOINFORMATICS_SOURCE="Orange-Bioinformatics-${BIOINFORMATICS_VERSION}.tar.gz"
35TEXT_SOURCE="Orange-Text-Mining-${TEXT_VERSION}.tar.gz"
36
37
38# Get source packages md5 checksum
39ORANGE_SOURCE_MD5=`md5 -q $WORK_DIR/$ORANGE_SOURCE`
40BIOINFORMATICS_SOURCE_MD5=`md5 -q $WORK_DIR/$BIOINFORMATICS_SOURCE`
41TEXT_SOURCE_MD5=`md5 -q $WORK_DIR/$TEXT_SOURCE`
42
43
44# Publish sources
45
46if [ ! -e $SOURCES_DIR ]; then
47    mkdir -p $SOURCES_DIR
48fi
49
50if [[ ! -e $SOURCES_DIR/$ORANGE_SOURCE || $FORCE ]]; then
51    cp $WORK_DIR/$ORANGE_SOURCE $SOURCES_DIR/$ORANGE_SOURCE
52    NEW_ORANGE=1
53fi
54
55if [[ ! -e $SOURCES_DIR/BIOINFORMATICS_SOURCE || $FORCE ]]; then
56    cp $WORK_DIR/$BIOINFORMATICS_SOURCE $SOURCES_DIR/$BIOINFORMATICS_SOURCE
57    NEW_BIOINFORMATICS=1
58fi
59
60if [[ ! -e $SOURCES_DIR/TEXT_SOURCE || $FORCE ]]; then
61    cp $WORK_DIR/$TEXT_SOURCE $SOURCES_DIR/$TEXT_SOURCE
62    NEW_TEXT=1
63fi
64
65FINK_ROOT=/sw
66
67# Update the local/main finkinfo files
68FINKINFO_DIR="$FINK_ROOT/fink/dists/local/main/finkinfo"
69
70if [ ! -e $FINFINFO_DIR ]; then
71    mkdir -p $FINKINFO_DIR
72fi
73
74# Directory where fink .info templates are
75#FINK_TEMPLATES=fink
76FINK_TEMPLATES=$WORK_DIR/orange/install-scripts/mac/fink
77BASE_URL="file://$SOURCES_DIR"
78
79if [[ $NEW_ORANGE || $FORCE ]]; then
80    FINK_ORANGE_SOURCE_TEMPLATE="Orange-%v.tar.gz"
81    ./fink-register-info.sh "$FINK_TEMPLATES/orange-gui-dev-py.info" $BASE_URL/$FINK_ORANGE_SOURCE_TEMPLATE $ORANGE_SOURCE_MD5 $ORANGE_VERSION $FINKINFO_DIR/orange-gui-dev-py.info
82fi
83
84if [[ $NEW_BIOINFORMATICS || $FORCE ]]; then
85    FINK_BIOINFORMATICS_SOURCE_TEMPLATE="Orange-Bioinformatics-%v.tar.gz"
86    ./fink-register-info.sh "$FINK_TEMPLATES/orange-bioinformatics-gui-dev-py.info" $BASE_URL/$FINK_BIOINFORMATICS_SOURCE_TEMPLATE $BIOINFORMATICS_SOURCE_MD5 $BIOINFORMATICS_VERSION $FINKINFO_DIR/orange-bioinformatics-gui-dev-py.info
87fi
88
89if [[ $NEW_TEXT || $FORCE ]]; then
90    FINK_TEXT_SOURCE_TEMPLATE="Orange-Text-Mining-%v.tar.gz"
91    ./fink-register-info.sh "$FINK_TEMPLATES/orange-text-gui-dev-py.info" $BASE_URL/$FINK_TEXT_SOURCE_TEMPLATE $TEXT_SOURCE_MD5 $TEXT_VERSION $FINKINFO_DIR/orange-text-gui-dev-py.info
92fi
93
94# Index the new packages
95fink index
96
Note: See TracBrowser for help on using the repository browser.