From: Ben Crocker <[email protected]>

Still passes shellcheck.

Signed-off-by: Ben Crocker <[email protected]>
---
 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..c5646637ffbc 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 -f "$cfgtmp"
                else
-                       mv "${cfgtmp}" "${cfg}"
+                       mv "$cfgtmp" "$cfg"
                fi
-               rm "${cfgorig}"
+               rm -f "$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 -- [email protected]
To unsubscribe send an email to [email protected]
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/[email protected]

Reply via email to