Merge "Fix BASEDIR to package Kolla with snapcraft.io"
This commit is contained in:
commit
d561c23496
@ -5,12 +5,16 @@
|
||||
function find_base_dir {
|
||||
local real_path=$(python -c "import os;print(os.path.realpath('$0'))")
|
||||
local dir_name="$(dirname "$real_path")"
|
||||
if [[ ${dir_name} == "/usr/bin" ]]; then
|
||||
BASEDIR=/usr/share/kolla
|
||||
elif [[ ${dir_name} == "/usr/local/bin" ]]; then
|
||||
BASEDIR=/usr/local/share/kolla
|
||||
if [ -z "$SNAP" ]; then
|
||||
if [[ ${dir_name} == "/usr/bin" ]]; then
|
||||
BASEDIR=/usr/share/kolla
|
||||
elif [[ ${dir_name} == "/usr/local/bin" ]]; then
|
||||
BASEDIR=/usr/local/share/kolla
|
||||
else
|
||||
BASEDIR="$(dirname ${dir_name})"
|
||||
fi
|
||||
else
|
||||
BASEDIR="$(dirname ${dir_name})"
|
||||
BASEDIR="$SNAP/share/kolla"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user