| Sean Dague | 0392a10 | 2013-07-31 13:07:45 -0400 | [diff] [blame] | 1 | # lib/infra | 
|  | 2 | # | 
|  | 3 | # Functions to install infrastructure projects needed by other projects | 
|  | 4 | # early in the cycle. We need this so we can do things like gate on | 
|  | 5 | # requirements as a global list | 
|  | 6 |  | 
|  | 7 | # Dependencies: | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 8 | # | 
|  | 9 | # - ``functions`` file | 
| Sean Dague | 0392a10 | 2013-07-31 13:07:45 -0400 | [diff] [blame] | 10 |  | 
|  | 11 | # ``stack.sh`` calls the entry points in this order: | 
|  | 12 | # | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 13 | # - install_infra | 
| Sean Dague | 0392a10 | 2013-07-31 13:07:45 -0400 | [diff] [blame] | 14 |  | 
|  | 15 | # Save trace setting | 
|  | 16 | XTRACE=$(set +o | grep xtrace) | 
|  | 17 | set +o xtrace | 
|  | 18 |  | 
|  | 19 |  | 
|  | 20 | # Defaults | 
|  | 21 | # -------- | 
| Sean Dague | cc52406 | 2014-10-01 09:06:43 -0400 | [diff] [blame] | 22 | GITDIR["pbr"]=$DEST/pbr | 
| Sean Dague | 0392a10 | 2013-07-31 13:07:45 -0400 | [diff] [blame] | 23 | REQUIREMENTS_DIR=$DEST/requirements | 
|  | 24 |  | 
|  | 25 | # Entry Points | 
|  | 26 | # ------------ | 
|  | 27 |  | 
| Sean Dague | 0392a10 | 2013-07-31 13:07:45 -0400 | [diff] [blame] | 28 | # install_infra() - Collect source and prepare | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 29 | function install_infra { | 
| Sean Dague | 0392a10 | 2013-07-31 13:07:45 -0400 | [diff] [blame] | 30 | # bring down global requirements | 
|  | 31 | git_clone $REQUIREMENTS_REPO $REQUIREMENTS_DIR $REQUIREMENTS_BRANCH | 
|  | 32 |  | 
|  | 33 | # Install pbr | 
| Sean Dague | cc52406 | 2014-10-01 09:06:43 -0400 | [diff] [blame] | 34 | if use_library_from_git "pbr"; then | 
|  | 35 | git_clone_by_name "pbr" | 
|  | 36 | setup_lib "pbr" | 
|  | 37 | else | 
|  | 38 | pip_install "pbr" | 
|  | 39 | fi | 
| Sean Dague | 0392a10 | 2013-07-31 13:07:45 -0400 | [diff] [blame] | 40 | } | 
|  | 41 |  | 
|  | 42 | # Restore xtrace | 
|  | 43 | $XTRACE | 
|  | 44 |  | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 45 | # Tell emacs to use shell-script-mode | 
|  | 46 | ## Local variables: | 
|  | 47 | ## mode: shell-script | 
|  | 48 | ## End: |