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
1=== modified file 'buildout-templates/bin/combo-rootdir.in'
2--- buildout-templates/bin/combo-rootdir.in 2012-02-02 06:01:27 +0000
3+++ buildout-templates/bin/combo-rootdir.in 2012-02-14 01:43:19 +0000
4@@ -1,5 +1,8 @@
5 #!/bin/sh
6
7+# Copyright 2012 Canonical Ltd. This software is licensed under the
8+# GNU Affero General Public License version 3 (see the file LICENSE).
9+
10 set -e
11
12 if [ -z "$1" ]; then
13@@ -9,25 +12,25 @@
14
15 BUILD_DIR=$1
16
17-if [ -d "$BUILD_DIR/lp" ]; then
18- echo "$0: Assuming build dir is up-to-date."
19- exit 0
20-fi
21-
22 # Populate YUI.
23-ln -sf yui-${versions:yui} $BUILD_DIR/yui
24+if [ ! -h $BUILD_DIR/yui ]; then
25+ ln -sf yui-${versions:yui} $BUILD_DIR/yui
26+fi
27
28 # And YUI 2, for now.
29-cp -a lib/canonical/launchpad/icing/yui_2.7.0b/build $BUILD_DIR/yui2
30+if [ ! -d $BUILD_DIR/yui2 ]; then
31+ cp -a lib/canonical/launchpad/icing/yui_2.7.0b/build $BUILD_DIR/yui2
32+fi
33
34 # Copy in our modules.
35+rm -rf $BUILD_DIR/lp
36 mkdir $BUILD_DIR/lp
37 for jsdir in lib/lp/*/javascript ; do
38 app=$(echo $jsdir | sed -e 's,lib/lp/\(.*\)/javascript,\1,')
39 cp -a $jsdir $BUILD_DIR/lp/$app
40 done
41 # ... and delete tests.
42-find $BUILD_DIR -name 'tests' -type d | xargs rm -rf
43+find $BUILD_DIR/lp -name 'tests' -type d | xargs rm -rf
44
45 # We have to move some modules around.
46 cp lib/lp/contrib/javascript/lp.mustache.js $BUILD_DIR/lp