Browse code

Source fixup_stuff...

...so it can pick up config variables from local.conf

Change-Id: I0991f59881f16c72789e3b0342c26a2419ba0878

Dean Troyer authored on 2014/08/16 04:03:52
Showing 2 changed files
... ...
@@ -662,7 +662,7 @@ if [[ "$OFFLINE" != "True" ]]; then
662 662
 fi
663 663
 
664 664
 # Do the ugly hacks for broken packages and distros
665
-$TOP_DIR/tools/fixup_stuff.sh
665
+source $TOP_DIR/tools/fixup_stuff.sh
666 666
 
667 667
 
668 668
 # Extras Pre-install
... ...
@@ -20,20 +20,24 @@
20 20
 #   - pre-install hgtools to work around a bug in RHEL6 distribute
21 21
 #   - install nose 1.1 from EPEL
22 22
 
23
-set -o errexit
24
-set -o xtrace
23
+# If TOP_DIR is set we're being sourced rather than running stand-alone
24
+# or in a sub-shell
25
+if [[ -z "$TOP_DIR" ]]; then
26
+    set -o errexit
27
+    set -o xtrace
25 28
 
26
-# Keep track of the current directory
27
-TOOLS_DIR=$(cd $(dirname "$0") && pwd)
28
-TOP_DIR=$(cd $TOOLS_DIR/..; pwd)
29
+    # Keep track of the current directory
30
+    TOOLS_DIR=$(cd $(dirname "$0") && pwd)
31
+    TOP_DIR=$(cd $TOOLS_DIR/..; pwd)
29 32
 
30
-# Change dir to top of devstack
31
-cd $TOP_DIR
33
+    # Change dir to top of devstack
34
+    cd $TOP_DIR
32 35
 
33
-# Import common functions
34
-source $TOP_DIR/functions
36
+    # Import common functions
37
+    source $TOP_DIR/functions
35 38
 
36
-FILES=$TOP_DIR/files
39
+    FILES=$TOP_DIR/files
40
+fi
37 41
 
38 42
 # Keystone Port Reservation
39 43
 # -------------------------