[5dbc64]: tools-for-build / whitespacely-canonical-filenames Maximize Restore History

Download this file

whitespacely-canonical-filenames    36 lines (29 with data), 960 Bytes

#!/bin/sh

# (a script to be run in the root directory of the distribution,
# probably as part of an enclosing do-something-with-whitespace script)
#
# Print to stdout the names of files whose whitespace we (SBCLers)
# try to keep canonical.

# glob patterns for source files in languages for which the
# canonicalization is safe (not affecting meaning, at least given the
# conservative syntax used in SBCL sources)
source_extensions='.lisp .lisp-expr .c .h'
# other candidates:
#   .sh: if ./make.sh is altered, Bad Things happen
#   ?

stamp_file=whitespace-stamp

if [ -e $stamp_file ]; then
    find_opt="-newer $stamp_file"
else
    find_opt=""
fi

for source_extension in $source_extensions; do 
    find . \( \
            -name _darcs -o \
            -name '{arch}' -o \
            -name CVS -o \
            -name .hg -o \
            -name .svn \) -type d -prune -o \
           $find_opt -name '*'$source_extension -print
done

touch $stamp_file