[OS-BUILD PATCHv3 2/3] process_configs.sh: Reduce multiple quotes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ben Crocker <bcrocker@xxxxxxxxxx>

Still passes shellcheck.

Signed-off-by: Ben Crocker <bcrocker@xxxxxxxxxx>
---
 redhat/configs/process_configs.sh | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/redhat/configs/process_configs.sh b/redhat/configs/process_configs.sh
index 86d8f805418c..9298c6e2bc41 100755
--- a/redhat/configs/process_configs.sh
+++ b/redhat/configs/process_configs.sh
@@ -36,7 +36,7 @@ switch_to_toplevel()
 			test -d "$path"/drivers && \
 			break
 
-		path="$(dirname "$path")"
+		path=$(dirname "$path")
 	done
 
 	test -n "$path"  || die "Can't find toplevel"
@@ -148,7 +148,7 @@ parsenewconfigs()
 	popd &> /dev/null
 	for f in "$tmpdir"/*; do
 		[[ -e "$f" ]] || break
-		cp "$f" "$SCRIPT_DIR"/pending"$FLAVOR"/generic/
+		cp "$f" "$SCRIPT_DIR/pending$FLAVOR/generic/"
 	done
 
 	rm -rf "$tmpdir"
@@ -159,7 +159,7 @@ function commit_new_configs()
 	# assume we are in $source_tree/configs, need to get to top level
 	pushd "$(switch_to_toplevel)" &>/dev/null
 
-	for cfg in "$SCRIPT_DIR"/"${PACKAGE_NAME}""${KVERREL}""${SUBARCH}"*.config
+	for cfg in "$SCRIPT_DIR/${PACKAGE_NAME}${KVERREL}${SUBARCH}"*.config
 	do
 		arch=$(head -1 "$cfg" | cut -b 3-)
 		cfgtmp="${cfg}.tmp"
@@ -184,7 +184,7 @@ function commit_new_configs()
 		echo "done"
 	done
 
-	git add "$SCRIPT_DIR"/pending"$FLAVOR"
+	git add "$SCRIPT_DIR/pending$FLAVOR"
 	git commit -m "[redhat] AUTOMATIC: New configs"
 }
 
@@ -193,7 +193,7 @@ function process_configs()
 	# assume we are in $source_tree/configs, need to get to top level
 	pushd "$(switch_to_toplevel)" &>/dev/null
 
-	for cfg in "$SCRIPT_DIR"/"${PACKAGE_NAME}""${KVERREL}""${SUBARCH}"*.config
+	for cfg in "$SCRIPT_DIR/${PACKAGE_NAME}${KVERREL}${SUBARCH}"*.config
 	do
 		arch=$(head -1 "$cfg" | cut -b 3-)
 		cfgtmp="${cfg}.tmp"
@@ -242,11 +242,11 @@ function process_configs()
 		# if test run, don't overwrite original
 		if test -n "$TESTRUN"
 		then
-			rm "${cfgtmp}"
+			rm "$cfgtmp"
 		else
-			mv "${cfgtmp}" "${cfg}"
+			mv "$cfgtmp" "$cfg"
 		fi
-		rm "${cfgorig}"
+		rm "$cfgorig"
 		echo "done"
 	done
 	rm "$SCRIPT_DIR"/*.config*.old
@@ -304,8 +304,8 @@ PACKAGE_NAME="${1:-kernel}" # defines the package name used
 KVERREL="$(test -n "$2" && echo "-$2" || echo "")"
 SUBARCH="$(test -n "$3" && echo "-$3" || echo "")"
 FLAVOR="$(test -n "$4" && echo "-$4" || echo "-common")"
-SCRIPT="$(readlink -f "$0")"
-SCRIPT_DIR="$(dirname "$SCRIPT")"
+SCRIPT=$(readlink -f "$0")
+SCRIPT_DIR=$(dirname "$SCRIPT")
 
 # Most RHEL options are options we want in Fedora so RHEL pending settings head
 # to common/
-- 
GitLab
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux