use list everywhere

This commit is contained in:
David Holdeman 2023-01-18 22:11:07 -06:00
parent 3544e74261
commit db68bfc55e
1 changed files with 4 additions and 4 deletions

View File

@ -74,9 +74,9 @@ checkurl() {
# Build the search term we will look for.
# All hyphens and underscores are replaced with asterisks, so we
# can find files with mismatched hyphens or underscores.
SEARCH='*'$(basename "$2" | sed 's/[-_ ]/*/g')'*'
SEARCH='.*'$(basename "$2" | sed 's/[-_ ]/.*/g')'.*'
# Search for matching files.
FILES=$(find . -iname "$SEARCH")
FILES=$(echo "$LIST" | grep -i "$SEARCH")
(
flock -x 200
# Print the filename and the broken link.
@ -112,9 +112,9 @@ checkurl() {
# Build the search term we will look for.
# All hyphens and underscores are replaced with asterisks, so we
# can find files with mismatched hyphens or underscores.
SEARCH='*'$(basename "$2" | sed 's/[-_ ]/*/g')'*'
SEARCH='.*'$(basename "$2" | sed 's/[-_ ]/.*/g')'.*'
# Search for matching files.
FILES=$(find . -iname "$SEARCH")
FILES=$(echo "$LIST" | grep -i "$SEARCH")
(
flock -x 200
echo "In $1:" >&2