From d903719c98753ccac815b4194cc260916a79796f Mon Sep 17 00:00:00 2001 From: Lou DeGenaro Date: Wed, 29 Nov 2023 14:49:40 -0500 Subject: [PATCH] fix: use ls -1 (the number one not the letter L) Signed-off-by: Lou DeGenaro --- scripts/automation/push.sh | 4 ++-- scripts/automation/release.sh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/automation/push.sh b/scripts/automation/push.sh index b67b43f..f6f023b 100755 --- a/scripts/automation/push.sh +++ b/scripts/automation/push.sh @@ -86,8 +86,8 @@ function err() { msg "$*" 1>&2 } -COUNT_CATALOGS=$(ls -l catalogs | grep ^- | wc -l) -COUNT_CATALOG_MD=$(ls -l md_catalogs | grep ^- | wc -l) +COUNT_CATALOGS=$(ls -1 catalogs | wc -l) +COUNT_CATALOG_MD=$(ls -1 md_catalogs | wc -l) if [ "$COUNT_CATALOGS" == "0" ] || [ "$COUNT_CATALOG_MD" == "0" ] then echo "no catalog or markdown present -> nothing to do" diff --git a/scripts/automation/release.sh b/scripts/automation/release.sh index 543580f..414b49c 100755 --- a/scripts/automation/release.sh +++ b/scripts/automation/release.sh @@ -2,8 +2,8 @@ source config.env -COUNT_CATALOGS=$(ls -l catalogs | grep ^- | wc -l) -COUNT_CATALOG_MD=$(ls -l md_catalogs | grep ^- | wc -l) +COUNT_CATALOGS=$(ls -1 catalogs | wc -l) +COUNT_CATALOG_MD=$(ls -1 md_catalogs | wc -l) if [ "$COUNT_CATALOGS" == "0" ] || [ "$COUNT_CATALOG_MD" == "0" ] then echo "no catalog or markdown present -> nothing to do" @@ -13,7 +13,7 @@ else export VERSION_TAG="$version_tag" echo "VERSION_TAG=${VERSION_TAG}" >> $GITHUB_ENV # There is no md but json has at least one control - COUNT=$(ls -l md_catalogs | grep ^- | wc -l) + COUNT=$(ls -1 md_catalogs | wc -l) if [ $COUNT -lt 1 ] then ./scripts/automation/regenerate_catalogs.sh