Skip to content
Snippets Groups Projects
Commit d561c234 authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Fix BASEDIR to package Kolla with snapcraft.io"

parents 515bef3c 882c3123
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment