source: orange/install-scripts/mac/bundle-inject-hg.sh @ 10789:3178bd8fce77

Revision 10789:3178bd8fce77, 1.1 KB checked in by Ales Erjavec <ales.erjavec@…>, 2 years ago (diff)

Packaging scripts fixes.

  • 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
35echo "Checking for incomming changesets"
36if hg incoming -R $CLONE_FULLPATH; then
37    echo "Changesets found. Pulling and updating."
38    hg pull --update -R $CLONE_FULLPATH
39fi
40
41cd $CLONE_FULLPATH
42
43# Run installation
44echo "Running setup.py install with python '$PYTHON'"
45$PYTHON setup.py install --single-version-externally-managed --record=RECORD.txt
46
47# Clean up the archive
48cd $WORK_DIR
49
50true
Note: See TracBrowser for help on using the repository browser.