source: orange/install-scripts/mac/dailyrun-sources.sh @ 10555:1d460e9bd505

Revision 10555:1d460e9bd505, 2.4 KB checked in by Ales Erjavec <ales.erjavec@…>, 2 years ago (diff)

Added dailyrun-sources.sh script

  • Property exe set to *
Line 
1#!/bin/bash -e
2#
3# Should be run as: sudo ./dailyrun-sources.sh work/dir
4#
5# $1 work dir
6# $2 force
7# $3 local build
8
9WORK_DIR=${1:-"/private/tmp"}
10
11FORCE=$2
12LOCAL=$3
13
14test -r /sw/bin/init.sh && . /sw/bin/init.sh
15
16export PATH=$HOME/bin:$PATH
17
18if [ $LOCAL ]; then
19    PUBLISH_DIR=$WORK_DIR/download
20    mkdir -p $PUBLISH_DIR
21else
22    PUBLISH_DIR=/Volumes/download
23fi
24
25if [ ! -e $WORK_DIR ]; then
26    mkdir -p $WORK_DIR
27fi
28
29REPO_DIR=$WORK_DIR/repos
30
31# Build source packages
32./build-source.sh https://bitbucket.org/biolab/orange orange tip $REPO_DIR Orange
33./build-source.sh https://bitbucket.org/biolab/orange-addon-bioinformatics bioinformatics tip $REPO_DIR Orange-Bioinformatics
34./build-source.sh https://bitbucket.org/biolab/orange-addon-text text tip $REPO_DIR Orange-Text-Mining
35
36defaults write com.apple.desktopservices DSDontWriteNetworkStores true
37
38if [ ! $LOCAL ]; then
39    /Users/ailabc/mount-dirs.sh || { echo "Mounting failed." ; exit 1 ; }
40fi
41
42# Get versions from PKG-INFO files
43ORANGE_VERSION=`grep "^Version:" $REPO_DIR/Orange.egg-info/PKG-INFO | cut -d " " -f 2`
44BIOINFORMATICS_VERSION=`grep "^Version:" $REPO_DIR/Orange_Bioinformatics.egg-info/PKG-INFO | cut -d " " -f 2`
45TEXT_VERSION=`grep "^Version:" $REPO_DIR/Orange_Text_Mining.egg-info/PKG-INFO | cut -d " " -f 2`
46
47# Source filenames
48ORANGE_SOURCE="Orange-${ORANGE_VERSION}.tar.gz"
49BIOINFORMATICS_SOURCE="Orange-Bioinformatics-${BIOINFORMATICS_VERSION}.tar.gz"
50TEXT_SOURCE="Orange-Text-Mining-${TEXT_VERSION}.tar.gz"
51
52# Get source packages md5 checksum
53ORANGE_SOURCE_MD5=`md5 -q $REPO_DIR/$ORANGE_SOURCE`
54BIOINFORMATICS_SOURCE_MD5=`md5 -q $REPO_DIR/$BIOINFORMATICS_SOURCE`
55TEXT_SOURCE_MD5=`md5 -q $REPO_DIR/$TEXT_SOURCE`
56
57
58# Base dir for sources
59SOURCES_DIR=$PUBLISH_DIR/sources
60
61
62# Publish sources
63
64if [ ! -e $SOURCES_DIR ]; then
65    mkdir -p $SOURCES_DIR
66fi
67
68
69if [[ ! -e $SOURCES_DIR/$ORANGE_SOURCE || $FORCE ]]; then
70    cp $REPO_DIR/$ORANGE_SOURCE $SOURCES_DIR/$ORANGE_SOURCE
71    cp -r $REPO_DIR/Orange.egg-info $SOURCES_DIR/
72    NEW_ORANGE=1
73fi
74
75if [[ ! -e $SOURCES_DIR/BIOINFORMATICS_SOURCE || $FORCE ]]; then
76    cp $REPO_DIR/$BIOINFORMATICS_SOURCE $SOURCES_DIR/$BIOINFORMATICS_SOURCE
77    cp -r $REPO_DIR/Orange_Bioinformatics.egg-info $SOURCES_DIR/
78    NEW_BIOINFORMATICS=1
79fi
80
81if [[ ! -e $SOURCES_DIR/TEXT_SOURCE || $FORCE ]]; then
82    cp $REPO_DIR/$TEXT_SOURCE $SOURCES_DIR/$TEXT_SOURCE
83    cp -r $REPO_DIR/Orange_Text_Mining.egg-info $SOURCES_DIR/
84    NEW_TEXT=1
85fi
86
87true
Note: See TracBrowser for help on using the repository browser.