1
1
openmpi/contrib/whitespace-purge.sh

26 строки
815 B
Bash
Исходник Обычный вид История

2015-06-24 06:59:57 +03:00
#!/bin/bash
#
# Copyright (c) 2015 Intel, Inc. All rights reserved.
# Copyright (c) 2015 Los Alamos National Security, LLC. All rights
# reserved
# Copyright (c) 2015 Cisco Systems, Inc.
2015-06-24 06:59:57 +03:00
# $COPYRIGHT$
2015-06-25 23:27:56 +03:00
#
2015-06-24 06:59:57 +03:00
# Additional copyrights may follow
2015-06-25 23:27:56 +03:00
#
2015-06-24 06:59:57 +03:00
# $HEADER$
#
for file in $(git ls-files) ; do
# check for the mime-type and do not follow symbolic links. this
# will cause file to print application/x-symlink for the mime-type
# allowing us to only have to check if the type is application to
# skip sym links, pdfs, etc. If any other file types should be
# skipped add the check here.
type=$(file -b --mime-type -h $file)
if test ${type::4} == "text" ; then
# Eliminate whitespace at the end of lines
perl -pi -e 's/\s*$/\n/' $file
fi
done