-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master: check_invisible.sh: fix for macOS.
fix some spelling warnings generated by newer version of xrst.
- Loading branch information
Showing
8 changed files
with
16 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
set -e -u | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
# SPDX-FileCopyrightText: Bradley M. Bell <[email protected]> | ||
# SPDX-FileContributor: 2020-22 Bradley M. Bell | ||
# SPDX-FileContributor: 2020-24 Bradley M. Bell | ||
# ----------------------------------------------------------------------------- | ||
if [ "$0" != "bin/check_invisible.sh" ] | ||
then | ||
|
@@ -19,13 +19,21 @@ else | |
echo 'usage: bin/check_invisible [all]' | ||
exit 1 | ||
fi | ||
# | ||
# sed_path | ||
if which gsed >& /dev/null | ||
then | ||
sed_path=$(which gsed) | ||
else | ||
sed_path=$(which sed) | ||
fi | ||
# ---------------------------------------------------------------------------- | ||
# file_list | ||
if [ "$all" == 'true' ] | ||
then | ||
file_list=$(git ls-files) | ||
else | ||
file_list=$(git status --porcelain | sed -e 's|^...||') | ||
file_list=$(git status --porcelain | $sed_path -e 's|^...||') | ||
fi | ||
# | ||
# sed.$$ | ||
|
@@ -41,7 +49,7 @@ for file in $file_list | |
do | ||
if [ -f "$file" ] | ||
then | ||
sed -f sed.$$ $file > copy.$$ | ||
$sed_path -f sed.$$ $file > copy.$$ | ||
if ! diff $file copy.$$ > diff.$$ | ||
then | ||
echo "original (<) invisible white space removed (>)" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ | |
# {xrst_begin check_input_files dev} | ||
# {xrst_spell | ||
# conf | ||
# config | ||
# } | ||
# {xrst_comment_ch #} | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters