Merge lp:~stevenk/launchpad/smarter-combo-rootdir into lp:launchpad

Proposed by Steve Kowalik
Status: Merged
Approved by: William Grant
Approved revision: no longer in the source branch.
Merged at revision: 14792
Proposed branch: lp:~stevenk/launchpad/smarter-combo-rootdir
Merge into: lp:launchpad
Diff against target: 46 lines (+11/-8)
1 file modified
buildout-templates/bin/combo-rootdir.in (+11/-8)
To merge this branch: bzr merge lp:~stevenk/launchpad/smarter-combo-rootdir
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+92897@code.launchpad.net

Commit message

combo-rootdir now rebuilds lp, and won't attempt to run right over the two yui directories if they exist.

Description of the change

bin/combo-rootdir now rebuilds lp, and won't attempt to run right over the two yui directories if they exist. Sprinkle in a copyright statement.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'buildout-templates/bin/combo-rootdir.in'
--- buildout-templates/bin/combo-rootdir.in 2012-02-02 06:01:27 +0000
+++ buildout-templates/bin/combo-rootdir.in 2012-02-14 01:43:19 +0000
@@ -1,5 +1,8 @@
1#!/bin/sh1#!/bin/sh
22
3# Copyright 2012 Canonical Ltd. This software is licensed under the
4# GNU Affero General Public License version 3 (see the file LICENSE).
5
3set -e6set -e
47
5if [ -z "$1" ]; then8if [ -z "$1" ]; then
@@ -9,25 +12,25 @@
912
10BUILD_DIR=$113BUILD_DIR=$1
1114
12if [ -d "$BUILD_DIR/lp" ]; then
13 echo "$0: Assuming build dir is up-to-date."
14 exit 0
15fi
16
17# Populate YUI.15# Populate YUI.
18ln -sf yui-${versions:yui} $BUILD_DIR/yui16if [ ! -h $BUILD_DIR/yui ]; then
17 ln -sf yui-${versions:yui} $BUILD_DIR/yui
18fi
1919
20# And YUI 2, for now.20# And YUI 2, for now.
21cp -a lib/canonical/launchpad/icing/yui_2.7.0b/build $BUILD_DIR/yui221if [ ! -d $BUILD_DIR/yui2 ]; then
22 cp -a lib/canonical/launchpad/icing/yui_2.7.0b/build $BUILD_DIR/yui2
23fi
2224
23# Copy in our modules.25# Copy in our modules.
26rm -rf $BUILD_DIR/lp
24mkdir $BUILD_DIR/lp27mkdir $BUILD_DIR/lp
25for jsdir in lib/lp/*/javascript ; do28for jsdir in lib/lp/*/javascript ; do
26 app=$(echo $jsdir | sed -e 's,lib/lp/\(.*\)/javascript,\1,')29 app=$(echo $jsdir | sed -e 's,lib/lp/\(.*\)/javascript,\1,')
27 cp -a $jsdir $BUILD_DIR/lp/$app30 cp -a $jsdir $BUILD_DIR/lp/$app
28done31done
29# ... and delete tests.32# ... and delete tests.
30find $BUILD_DIR -name 'tests' -type d | xargs rm -rf33find $BUILD_DIR/lp -name 'tests' -type d | xargs rm -rf
3134
32# We have to move some modules around.35# We have to move some modules around.
33cp lib/lp/contrib/javascript/lp.mustache.js $BUILD_DIR/lp36cp lib/lp/contrib/javascript/lp.mustache.js $BUILD_DIR/lp