Skip to content

Commit

Permalink
fixfiles: drop unnecessary \ line endings
Browse files Browse the repository at this point in the history
See koalaman/shellcheck#2769

Fixes:
    $ shellcheck -S error fixfiles

    In fixfiles line 189:
            # These two sorts need to be separate commands \
                                                            ^-- SC1143 (error): This backslash is part of a comment and does not continue the line.

    For more information:
      https://www.shellcheck.net/wiki/SC1143 -- This backslash is part of a comme...

Signed-off-by: Petr Lautrbach <[email protected]>
Acked-by: James Carter <[email protected]>
  • Loading branch information
bachradsusi committed Jun 12, 2024
1 parent df65714 commit be02ae5
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions policycoreutils/scripts/fixfiles
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ if [ -f ${PREFC} -a -x /usr/bin/diff ]; then
test -z "$TEMPFILE" && exit
PREFCTEMPFILE=`mktemp ${PREFC}.XXXXXXXXXX`
sed -r -e 's,:s0, ,g' $PREFC | sort -u > ${PREFCTEMPFILE}
sed -r -e 's,:s0, ,g' $FC | sort -u | \
/usr/bin/diff -b ${PREFCTEMPFILE} - | \
grep '^[<>]'|cut -c3-| grep ^/ | \
grep -Ev '(^/home|^/root|^/tmp)' |\
sed -r -e 's,:s0, ,g' $FC | sort -u |
/usr/bin/diff -b ${PREFCTEMPFILE} - |
grep '^[<>]'|cut -c3-| grep ^/ |
grep -Ev '(^/home|^/root|^/tmp)' |
sed -r -e 's,[[:blank:]].*,,g' \
-e 's|\(([/[:alnum:]]+)\)\?|{\1,}|g' \
-e 's|([/[:alnum:]])\?|{\1,}|g' \
Expand All @@ -186,19 +186,19 @@ if [ -f ${PREFC} -a -x /usr/bin/diff ]; then
-e 's|\(.*|*|g' \
-e 's|\[.*|*|g' \
-e 's|\.\*.*|*|g' \
-e 's|\.\+.*|*|g' | \
# These two sorts need to be separate commands \
sort -u | \
sort -d | \
while read pattern ; \
do if ! echo "$pattern" | grep -q -f ${TEMPFILE} 2>/dev/null; then \
echo "$pattern"; \
case "$pattern" in *"*") \
-e 's|\.\+.*|*|g' |
# These two sorts need to be separate commands
sort -u |
sort -d |
while read pattern ;
do if ! echo "$pattern" | grep -q -f ${TEMPFILE} 2>/dev/null; then
echo "$pattern";
case "$pattern" in *"*")
echo "$pattern" | sed -e 's,^,^,' -e 's,\*$,,g' >> ${TEMPFILE};;
esac; \
fi; \
done | \
${RESTORECON} ${VERBOSE} ${EXCLUDEDIRS} ${FORCEFLAG} ${THREADS} $* -i -R -f -; \
esac;
fi;
done |
${RESTORECON} ${VERBOSE} ${EXCLUDEDIRS} ${FORCEFLAG} ${THREADS} $* -i -R -f -;
rm -f ${TEMPFILE} ${PREFCTEMPFILE}
fi
}
Expand Down

0 comments on commit be02ae5

Please sign in to comment.