Steve Baker | 122ab70 | 2014-05-05 16:06:17 +1200 | [diff] [blame^] | 1 | # lib/dib |
| 2 | # Install and build images with **diskimage-builder** |
| 3 | |
| 4 | # Dependencies: |
| 5 | # |
| 6 | # - functions |
| 7 | # - DEST, DATA_DIR must be defined |
| 8 | |
| 9 | # stack.sh |
| 10 | # --------- |
| 11 | # - install_dib |
| 12 | |
| 13 | # Save trace setting |
| 14 | XTRACE=$(set +o | grep xtrace) |
| 15 | set +o xtrace |
| 16 | |
| 17 | # Defaults |
| 18 | # -------- |
| 19 | |
| 20 | # set up default directories |
| 21 | DIB_DIR=$DEST/diskimage-builder |
| 22 | TIE_DIR=$DEST/tripleo-image-elements |
| 23 | DIB_IMAGE_CACHE=$DATA_DIR/diskimage-builder/image-create |
| 24 | OCC_DIR=$DEST/os-collect-config |
| 25 | ORC_DIR=$DEST/os-refresh-config |
| 26 | OAC_DIR=$DEST/os-apply-config |
| 27 | |
| 28 | # Functions |
| 29 | # --------- |
| 30 | |
| 31 | # install_dib() - Collect source and prepare |
| 32 | function install_dib { |
| 33 | git_clone $DIB_REPO $DIB_DIR $DIB_BRANCH |
| 34 | pushd $DIB_DIR |
| 35 | pip_install ./ |
| 36 | popd |
| 37 | |
| 38 | git_clone $TIE_REPO $TIE_DIR $TIE_BRANCH |
| 39 | git_clone $OCC_REPO $OCC_DIR $OCC_BRANCH |
| 40 | git_clone $ORC_REPO $ORC_DIR $ORC_BRANCH |
| 41 | git_clone $OAC_REPO $OAC_DIR $OAC_BRANCH |
| 42 | mkdir -p $DIB_IMAGE_CACHE |
| 43 | } |
| 44 | |
| 45 | # Restore xtrace |
| 46 | $XTRACE |
| 47 | |
| 48 | # Tell emacs to use shell-script-mode |
| 49 | ## Local variables: |
| 50 | ## mode: shell-script |
| 51 | ## End: |