source: orange/install-scripts/mac/bundle-inject-hg.sh @ 11528:afc4dba85d81

Revision 11528:afc4dba85d81, 1.0 KB checked in by Ales Erjavec <ales.erjavec@…>, 11 months ago (diff)

Small fixes to OSX application bundle build scripts.

  • Property exe set to *
Line 
1#!/bin/bash -e
2#
3# Install an setup.py installable package from a
4# hg repository in to a .app bundle template
5#
6# $1 hg repo path
7# $2 repo clone name inside the working dir
8# $3 revision
9# $4 working directory where the repos will be cloned
10# $5 bundle template path
11#
12
13REPO=$1
14CLONE_NAME=$2
15REVISION=$3
16WORK_DIR=$4
17TEMPLATE_PATH=$5
18
19# Python interpreter in the bundle
20PYTHON=${TEMPLATE_PATH}/Contents/MacOS/python
21
22# Sets error handler
23trap "echo \"Script failed\"" ERR
24
25# Path to the local repo clone
26CLONE_FULLPATH=${WORK_DIR}/${CLONE_NAME}
27
28if [ ! -e $CLONE_FULLPATH ]; then
29    echo "Cloning $REPO to $CLONE_FULLPATH"
30    hg clone $REPO $CLONE_FULLPATH
31else
32    echo "Repository $CLONE_FULLPATH already present".
33fi
34
35cd $CLONE_FULLPATH
36
37echo "Checking for incomming changesets"
38if hg incoming; then
39    echo "Changesets found. Pulling."
40    hg pull
41fi
42
43echo "Updating to ${REVISION}"
44hg update -r ${REVISION}
45
46# Run installation
47echo "Running setup.py install with python '$PYTHON'"
48$PYTHON setup.py install --single-version-externally-managed --record=RECORD.txt
49
50true
Note: See TracBrowser for help on using the repository browser.