From 95ca92ae82cae5e14f526687d40043169cfa64b9 Mon Sep 17 00:00:00 2001 From: Alexey Khivin Date: Tue, 2 Aug 2016 21:48:07 +0300 Subject: [PATCH] Fix lint errors in tools/prepare_packages.sh Change-Id: I8e796becfe7786210ffec89ba8ca92e4ab4e1ea4 --- tools/prepare_packages.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tools/prepare_packages.sh b/tools/prepare_packages.sh index 5a8a6f6..1448de8 100755 --- a/tools/prepare_packages.sh +++ b/tools/prepare_packages.sh @@ -108,7 +108,7 @@ fi # if - yes, then define destination dir if $build_packages || $upload ; then # check destination dir - check_dir $destination_dir + check_dir "$destination_dir" # set distination dir # if it's absolute - it will not be changed, otherwise @@ -116,7 +116,7 @@ if $build_packages || $upload ; then if [[ "$destination_dir" = /* ]] ; then destination_dir=$destination_dir else - destination_dir="`pwd`/$destination_dir" + destination_dir="$(pwd)/$destination_dir" fi else echo "NOTE: Packages will not be built or uploaded. Use options -S or -U to change it." @@ -126,20 +126,20 @@ fi ### BUILDING PACKAGES ### if $build_packages ; then # check source dir - check_dir $source_dir + check_dir "$source_dir" # zip necessary apps - pushd $source_dir - for d in ${packages[@]}; do + pushd "$source_dir" + for d in ${packages[*]}; do filename="$destination_dir/org.openstack.ci_cd_pipeline_murano_app.$d.zip" - pushd $d/package + pushd "$d/package" # check that file exist and remove it or create new version - if [ -f $filename ] ; then + if [ -f "$filename" ] ; then if ! $refresh_existing_packages ; then - rm $filename + rm "$filename" fi fi - zip -r $filename * + zip -r "$filename" ./* popd done popd @@ -157,15 +157,15 @@ fi if $upload ; then # to have ability upload one package independently we need to remove it # via client and then upload it without updating its dependencies - for d in ${packages[@]}; do + for d in "${packages[@]}"; do filename="$destination_dir/org.openstack.ci_cd_pipeline_murano_app.$d.zip" - pkg_id=`murano package-list --owned | grep $d | awk '{print $2}'` - murano package-delete $pkg_id - murano package-import $filename --exists-action s + pkg_id=$(murano package-list --owned | grep "$d" | awk '{print $2}') + murano package-delete "$pkg_id" + murano package-import "$filename" --exists-action s done fi # if env name is specified, then create environment -if [ ! -z $env_name ] ; then - murano environment-create $env_name +if [ ! -z "$env_name" ] ; then + murano environment-create "$env_name" fi