ack is not needed: egrep does the same

This commit is contained in:
Laurent Rineau
2017-02-01 18:00:44 +01:00
parent 2ef63a5e18
commit 4cb90a88b7
+5 -16
View File
@@ -12,13 +12,6 @@ if [ -z "`git --version`" ]; then
fi
git=git
ack=ack-grep
if ! $ack --version >/dev/null 2>&1; then
ack=ack
fi
if ! $ack --version >/dev/null 2>&1; then
ack=NOACK
fi
if hub --version 2> /dev/null > /dev/null; then
case "$(hub --version)" in
*hub\ version*) git=hub;;
@@ -126,15 +119,11 @@ fi
#check header files without license include directive
echo '.. Checking include directives in header files...'
if [ $ack = NOACK ]; then
echo ' WARNING: test skipped because no `ack` tool was found'
else
file_without_license_include=$(for pkg in `$ack "^GPL" */package_info/*/license.txt -l | awk -F "/" '{print $1}'`; do find ${pkg}/include -type f -name '*.h' | xargs -r egrep -l "^#\s*define\s+CGAL_.*_H\s*$" | xargs -r grep -L "#include <CGAL/license"; done)
if [ -n "${file_without_license_include}" ]; then
echo "The following files do not have an include directive of the package license header:"
echo ${file_without_license_include}
exit 1
fi
file_without_license_include=$(for pkg in `egrep "^GPL" */package_info/*/license.txt -l | awk -F "/" '{print $1}'`; do find ${pkg}/include -type f -name '*.h' | xargs -r egrep -l "^#\s*define\s+CGAL_.*_H\s*$" | xargs -r grep -L "#include <CGAL/license"; done)
if [ -n "${file_without_license_include}" ]; then
echo "The following files do not have an include directive of the package license header:"
echo ${file_without_license_include}
exit 1
fi
#check no file contains non-utf8 characters