[PATCH 03/10] policycoreutils: fixfiles: syntax error

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

 



$ shellcheck fixfiles
...
In fixfiles line 94:
	  [[ "${i}" =~ "^[[:blank:]]*#" ]] && continue
                       ^-- SC2076: Don't quote rhs of =~, it'll match
                                   literally rather than as a regex.
---
 policycoreutils/scripts/fixfiles | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/policycoreutils/scripts/fixfiles b/policycoreutils/scripts/fixfiles
index da79f47..29982e2 100755
--- a/policycoreutils/scripts/fixfiles
+++ b/policycoreutils/scripts/fixfiles
@@ -91,7 +91,7 @@ exclude_dirs_from_relabelling() {
 	  # skip not absolute path
 	  # skip not directory
 	  [ -z "${i}" ] && continue
-	  [[ "${i}" =~ "^[[:blank:]]*#" ]] && continue
+	  [[ "${i}" =~ ^[[:blank:]]*# ]] && continue
 	  [[ ! "${i}" =~ ^/.* ]] && continue
 	  [[ ! -d "${i}" ]] && continue
 	  exclude_from_relabelling="$exclude_from_relabelling -e $i"
-- 
2.9.3




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux