fix errors found from shellcheck scan

(cherry picked from commit 78334f7a413a2678fd3cb4427af59c2cdcdfe31e)
This commit is contained in:
dongyuzhen 2024-01-12 16:34:50 +08:00 committed by openeuler-sync-bot
parent 7105497bc5
commit 930280245e
2 changed files with 47 additions and 1 deletions

View File

@ -0,0 +1,39 @@
From 731121ce199655c643ad8bbbec01a4d0efd9fa96 Mon Sep 17 00:00:00 2001
From: licunlong1 <licunlong1@huawei.com>
Date: Wed, 7 Sep 2022 17:09:00 +0800
Subject: [PATCH] fix errors found from shellcheck scan
---
plugins/demofiles.sh | 2 +-
rpmrebuild.sh | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/demofiles.sh b/plugins/demofiles.sh
index 7d3f029..7511fd9 100755
--- a/plugins/demofiles.sh
+++ b/plugins/demofiles.sh
@@ -40,7 +40,7 @@ function syntaxe () {
###############################################################################
# test for arguments
-while [[ $ 1 ]]
+while [[ $1 ]]
do
case $1 in
-h | --help )
diff --git a/rpmrebuild.sh b/rpmrebuild.sh
index 2da043e..8e4f9b2 100755
--- a/rpmrebuild.sh
+++ b/rpmrebuild.sh
@@ -562,7 +562,7 @@ function Main
CommandLineParsing "$@" || return
[ "x$NEED_EXIT" = "x" ] || return $NEED_EXIT
- Debug "rpmrebuild version $VERSION : $@"
+ Debug "rpmrebuild version $VERSION : $*"
check_i18ndomains
--
2.33.0

View File

@ -1,6 +1,6 @@
Name: rpmrebuild
Version: 2.16
Release: 9
Release: 10
Summary: A tool to build a rpm file from the rpm database
License: GPLv2+
URL: http://rpmrebuild.sourceforge.net
@ -13,6 +13,7 @@ Patch9003: fix-spelling-errors-that-could-mislead-users.patch
Patch9004: fix-cap-from-fs-does-not-work.patch
Patch9005: fix-comment-missing-n-does-not-work.patch
Patch9006: fix-r-does-not-work.patch
Patch9007: fix-errors-found-from-shellcheck-scan.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@ -64,6 +65,12 @@ rm -rf $RPM_BUILD_ROOT%{_mandir}/fr_FR.UTF-8/man1/
%{_mandir}/fr/man1/*.gz
%changelog
* Fri Jan 12 2024 dongyuzhen <dongyuzhen@h-partners.com> - 2.16-10
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:fix errors found from shellcheck scan
* Fri Nov 25 2022 dongyuzhen <dongyuzhen@h-partners.com> - 2.16-9
- Type:bugfix
- CVE:NA