Sergey Kraynev 9bed165c30 Fix shellcheck errors for LBaaS apps
Current patch fixes shell issues in LBaaS apps reported by test run:
tox -e shellcheck
All LB related scripts were fixed according command output.

Change-Id: Ia24f2ba25d7818cb05d064a9fc7f5f4617f714d8
2016-08-01 15:12:45 +03:00

39 lines
705 B
Bash
Executable File

#!/bin/bash
# Stop the script if an error occurs.
set -e
function cleanup {
cd "$SCRIPTPATH"
rm -rf tmp
}
# In case if script is running not where it is located.
cd "$(dirname "$0")"
SCRIPTPATH=$(pwd)
# Cleanup tmp dir on script exit.
trap 'cleanup' EXIT
mkdir tmp
pushd package
cp -v -r Classes Resources UI manifest.yaml logo.png ../tmp/
popd
archive_name=f5-lbaas-driver.tar.gz
f5_directory_name=f5_lbaas_driver-0.0.1
# Pack python tarball.
pushd tmp/Resources/scripts
tar -czvf $archive_name $f5_directory_name/*
base64 $archive_name > $archive_name.bs64
rm -rf $f5_directory_name
rm -rf $archive_name
popd
# Make murano package.
pushd tmp
zip -r ../F5_based_LBaaS.zip .
popd