~launchpad-pqm/launchpad/devel

4317.1.1 by Mark Shuttleworth
Initial batch of setup and maintenance scripts for LP
1
#! /bin/bash
8452.3.3 by Karl Fogel
* utilities/: Add copyright header block to source files that were
2
#
8687.15.2 by Karl Fogel
In files modified by r8688, change "<YEARS>" to "2009", as per
3
# Copyright 2009 Canonical Ltd.  This software is licensed under the
8687.15.3 by Karl Fogel
Shorten the copyright header block to two lines.
4
# GNU Affero General Public License version 3 (see the file LICENSE).
8452.3.3 by Karl Fogel
* utilities/: Add copyright header block to source files that were
5
#
6567.2.2 by Barry Warsaw
Respond to review comments.
6
# Create a new branch of LP called "foo" in $LP_PROJECT_PATH/foo, with all the
7
# source dependencies properly linked in.
8
6673.1.3 by Barry Warsaw
Use $HOME instead of ~
9
source "$HOME/.rocketfuel-env.sh"
6673.1.5 by Barry Warsaw
Respond to Edwin's review.
10
if [ "$?" != 0 ]; then
11
    echo "Please run rocketfuel-setup first."
12
    exit 1
13
fi
4317.1.1 by Mark Shuttleworth
Initial batch of setup and maintenance scripts for LP
14
8357.5.18 by Gary Poster
fix buildout issues
15
LP_DOWNLOAD_CACHE_PATH=$LP_PROJECT_ROOT/$LP_SOURCEDEPS_DIR/download-cache
16
LP_EGGS_PATH=$LP_PROJECT_ROOT/$LP_SOURCEDEPS_DIR/eggs
8329.1.2 by Gary Poster
specify zope.interface version; make bootstrap and buildout only called when necessary from make file; make change to rocketfuel config file unnecessary, so rocketfuel-setup does not need to be called; make twistd calls include sys.path in PYTHONPATH.
17
LP_DOWNLOAD_CACHE_PATH=$(eval echo ${LP_DOWNLOAD_CACHE_PATH})
18
LP_EGGS_PATH=$(eval echo ${LP_EGGS_PATH})
19
6567.1.3 by Barry Warsaw
parameterize all paths so that launchpad code can live anywhere.
20
if [ "x$1" == "x" ]; then
4317.1.1 by Mark Shuttleworth
Initial batch of setup and maintenance scripts for LP
21
    echo "Usage: $0 new-branch-name"
22
    echo "Example: '$0 fixes-bug-54356'"
23
    exit 2
24
fi
25
6567.1.3 by Barry Warsaw
parameterize all paths so that launchpad code can live anywhere.
26
if [ -e "${LP_PROJECT_PATH}/$1" ]; then
4420.1.2 by Elliot Murphy
Fixing typo in rocketfuel-branch.
27
    echo "Error: '$1' already exists"
4317.1.1 by Mark Shuttleworth
Initial batch of setup and maintenance scripts for LP
28
    exit 1
29
fi
30
6567.1.3 by Barry Warsaw
parameterize all paths so that launchpad code can live anywhere.
31
if [ ! -d "${LP_PROJECT_PATH}" ]; then
5534.2.4 by Mark Shuttleworth
Ensure date ranges are enforced by the DateWidget and use that for membership
32
  echo "Error: no rocketfuel found, please run rocketfuel-setup"
33
  exit 1
34
fi
6567.1.3 by Barry Warsaw
parameterize all paths so that launchpad code can live anywhere.
35
cd ${LP_PROJECT_PATH}
6567.1.4 by Barry Warsaw
Last minute patch and whitespace normalization.
36
if [ ! -d $LP_TRUNK_NAME ]; then
5534.2.4 by Mark Shuttleworth
Ensure date ranges are enforced by the DateWidget and use that for membership
37
  echo "Error: no trunk found, please run rocketfuel-setup"
38
  exit 1
4363.1.3 by Mark Shuttleworth
Make rocketfuel-branch work when disconnected
39
fi
5534.2.4 by Mark Shuttleworth
Ensure date ranges are enforced by the DateWidget and use that for membership
40
6567.1.3 by Barry Warsaw
parameterize all paths so that launchpad code can live anywhere.
41
bzr branch $LP_TRUNK_NAME $1
4317.1.1 by Mark Shuttleworth
Initial batch of setup and maintenance scripts for LP
42
cd $1
6567.1.3 by Barry Warsaw
parameterize all paths so that launchpad code can live anywhere.
43
utilities/link-external-sourcecode
4317.1.1 by Mark Shuttleworth
Initial batch of setup and maintenance scripts for LP
44
make