From 99144a595b767ef79acec058c838759bea73c579 Mon Sep 17 00:00:00 2001 From: Yang Sheng Date: Sat, 6 May 2023 15:16:17 +0800 Subject: [PATCH] LU-16232 script: fix the argument parse The issue makes script skip other arguments if the special parameter is not last one. Test-Parameter: trival Fixes: b533700add (LU-16232 scripts: changelog/updatelog emergency cleanup) Signed-off-by: Yang Sheng Change-Id: Ia309e7b6f1a62e76b80851848601c3d0b03be8b2 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50876 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Mikhail Pershin Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/scripts/remove_changelog | 2 +- lustre/scripts/remove_updatelog | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/scripts/remove_changelog b/lustre/scripts/remove_changelog index 0bda063..07650c6 100755 --- a/lustre/scripts/remove_changelog +++ b/lustre/scripts/remove_changelog @@ -71,7 +71,7 @@ while [ -n "$*" ]; do -q|--quiet) ECHO=:;; -z|--zip) OPT_ARCH="$2.tar"; shift;; *) - [ -e "$arg" ] && OPT_MOUNT="$arg" && break + [ -d "$arg" ] && OPT_MOUNT="$arg";; esac shift done diff --git a/lustre/scripts/remove_updatelog b/lustre/scripts/remove_updatelog index d4ee82a..3472084 100755 --- a/lustre/scripts/remove_updatelog +++ b/lustre/scripts/remove_updatelog @@ -89,7 +89,7 @@ while [ -n "$*" ]; do -q|--quiet) ECHO=:;; -z|--zip) OPT_ARCH="$2.tar"; shift;; *) - [ -e "$arg" ] && OPT_MOUNT="$arg" && break + [ -d "$arg" ] && OPT_MOUNT="$arg";; esac shift done -- 1.8.3.1