summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-08-18 10:54:35 +0000
committerGerrit Code Review <review@openstack.org>2016-08-18 10:54:35 +0000
commit9dbbee8fe1ed7a66e9b6513bda8a0911b02246da (patch)
tree7f3f755295ebf1c54acb403451b0dbb1f79cebe4
parent48aa28ef74b97f7a7c71e378fd43a8ce6f4ea180 (diff)
parent2ed5e21201f2a596e59787c77dfcab42266cb555 (diff)
Merge "Fix linters error by using "ls | grep""
-rwxr-xr-xtools/prepare_packages.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/prepare_packages.sh b/tools/prepare_packages.sh
index 9155525..d6960b9 100755
--- a/tools/prepare_packages.sh
+++ b/tools/prepare_packages.sh
@@ -131,6 +131,8 @@ if $build_packages ; then
131 # zip necessary apps 131 # zip necessary apps
132 pushd "$source_dir" 132 pushd "$source_dir"
133 for d in ${packages[*]}; do 133 for d in ${packages[*]}; do
134 # check that package is realy existed
135 check_dir "$d"
134 # get FQN for creating package 136 # get FQN for creating package
135 package_name="$(grep FullName "$d/package/manifest.yaml" | awk '{print $2}')" 137 package_name="$(grep FullName "$d/package/manifest.yaml" | awk '{print $2}')"
136 filename="$destination_dir/$package_name.zip" 138 filename="$destination_dir/$package_name.zip"
@@ -160,8 +162,7 @@ if $upload ; then
160 # to have ability upload one package independently we need to remove it 162 # to have ability upload one package independently we need to remove it
161 # via client and then upload it without updating its dependencies 163 # via client and then upload it without updating its dependencies
162 for d in "${packages[@]}"; do 164 for d in "${packages[@]}"; do
163 package_name="$(ls "$destination_dir" | grep "$d")" 165 filename="$(find "$destination_dir" -maxdepth 1 -name "*$d*")"
164 filename="$destination_dir/$package_name"
165 pkg_id=$(murano package-list --owned | grep "$d" | awk '{print $2}') 166 pkg_id=$(murano package-list --owned | grep "$d" | awk '{print $2}')
166 murano package-delete "$pkg_id" 167 murano package-delete "$pkg_id"
167 murano package-import "$filename" --exists-action s 168 murano package-import "$filename" --exists-action s