From: aravind.est Date: Tue, 2 Jul 2024 12:00:49 +0000 (+0100) Subject: Fix sample rapp generator to support helm artifact alone rApps X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F51%2F13151%2F1;p=nonrtric%2Fplt%2Frappmanager.git Fix sample rapp generator to support helm artifact alone rApps rApp package can have the artifact alone or the files which should create an artifact. This fixes the case when there is a helm artifact alone provided. Issue-ID: NONRTRIC-1019 Change-Id: I8bc96ccd07c1bf0c5d0ceab06a77c80dced3552d Signed-off-by: aravind.est --- diff --git a/sample-rapp-generator/generate.sh b/sample-rapp-generator/generate.sh index b7118a0..e3d0e6e 100755 --- a/sample-rapp-generator/generate.sh +++ b/sample-rapp-generator/generate.sh @@ -58,7 +58,7 @@ if [ -d "$DIRECTORY" ]; then checkHelmPackage rm -f $PACKAGENAME 2> /dev/null pushd $DIRECTORY - zip -r ../$PACKAGENAME * $(printf " -x %s" "${EXCLUDE_DIRS[@]}") + zip -r ../$PACKAGENAME * $([ ${#EXCLUDE_DIRS[@]} -gt 0 ] && printf " -x %s" "${EXCLUDE_DIRS[@]}") popd echo -e "rApp package $PACKAGENAME generated." else