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