Repository navigation
Expand file tree
/
Copy pathoslo
More file actions
57 lines (45 loc) · 1.31 KB
/
Copy pathoslo
File metadata and controls
57 lines (45 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# lib/oslo
#
# Functions to install oslo libraries from git
#
# We need this to handle the fact that projects would like to use
# pre-released versions of oslo libraries.
# Dependencies:
# ``functions`` file
# ``stack.sh`` calls the entry points in this order:
#
# install_oslo
# Save trace setting
XTRACE=$(set +o | grep xtrace)
set +o xtrace
# Defaults
# --------
OSLOCFG_DIR=$DEST/oslo.config
OSLOMSG_DIR=$DEST/oslo.messaging
# Entry Points
# ------------
# install_oslo() - Collect source and prepare
function install_oslo() {
# TODO(sdague): remove this once we get to Icehouse, this just makes
# for a smoother transition of existing users.
cleanup_oslo
git_clone $OSLOCFG_REPO $OSLOCFG_DIR $OSLOCFG_BRANCH
setup_develop $OSLOCFG_DIR
git_clone $OSLOMSG_REPO $OSLOMSG_DIR $OSLOMSG_BRANCH
setup_develop $OSLOMSG_DIR
}
# cleanup_oslo() - purge possibly old versions of oslo
function cleanup_oslo() {
# this means we've got an old oslo installed, lets get rid of it
if ! python -c 'import oslo.config' 2>/dev/null; then
echo "Found old oslo.config... removing to ensure consistency"
local PIP_CMD=$(get_pip_command)
pip_install oslo.config
sudo $PIP_CMD uninstall -y oslo.config
fi
}
# Restore xtrace
$XTRACE
# Local variables:
# mode: shell-script
# End: