commit:     61be85e19a48da7c6e8387cd46901b2852cb2e2c
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 14 08:14:22 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Jul 14 08:16:37 2022 +0000
URL:        
https://gitweb.gentoo.org/proj/xen-upstream-patches.git/commit/?id=61be85e1

Correctly obtain the array length

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 create-patches | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/create-patches b/create-patches
index 8e8c9fa..5a73699 100755
--- a/create-patches
+++ b/create-patches
@@ -18,7 +18,7 @@ 
XEN_MAJOR_MINOR_VERSION="${XEN_VER_COMPONENTS[0]}.${XEN_VER_COMPONENTS[1]}"
 git -C "${XEN_REPO_DIR}" fetch origin
 
 readarray -d '' CURRENT_PATCHES < <(find . -maxdepth 1 -type f -name "*.patch" 
-print0)
-if [[ ${CURRENT_PATCHES[@]} -gt 0 ]]; then
+if [[ ${#CURRENT_PATCHES[@]} -gt 0 ]]; then
        git rm -f *.patch
 fi
 

Reply via email to