source: orange/install-scripts/mac/build-source.sh @ 10508:db84659e31b0

Revision 10508:db84659e31b0, 906 bytes checked in by Ales Erjavec <ales.erjavec@…>, 2 years ago (diff)

Changed how packages are versioned.

  • Property exe set to *
Line 
1#!/bin/bash -e
2#
3# Build an Orange source package from a hg repo
4#
5# $1 hg repo
6# $2 local repository inside work dir
7# $3 hg revision
8# $4 work dir
9# $5 distribution name
10#
11# Example ./build-source.sh http://bitbucket.org/biolab/orange orange tip /private/tmp/repos Orange
12
13HG_REPO=$1
14REPO_DIRNAME=$2
15HG_REV=$3
16WORK_DIR=$4
17DIST_NAME=$5
18
19LOCAL_REPO=$WORK_DIR/$REPO_DIRNAME
20
21if [ ! -e $LOCAL_REPO ]; then
22    hg clone $HG_REPO $LOCAL_REPO
23fi
24
25if hg incoming -R $LOCAL_REPO; then
26    hg pull -R $LOCAL_REPO
27fi
28
29hg update -r $HG_REV -R $LOCAL_REPO
30
31cd $LOCAL_REPO
32
33# Remove old sources
34rm -rf dist/
35
36# Build the source distribution
37BUILD_TAG=`hg parent --template=".dev-r{rev}-{node|short}"`
38python setup.py egg_info --tag-build=$BUILD_TAG sdist
39
40# Copy the source an egg info to workdir
41cp dist/${DIST_NAME}-*.tar.gz $WORK_DIR
42
43UDIST_NAME=`echo $DIST_NAME | sed s/-/_/g`
44cp -r  $UDIST_NAME.egg-info $WORK_DIR
45
46true
Note: See TracBrowser for help on using the repository browser.