diff --git a/.travis.yml b/.travis.yml index 7ded78f4..a7bd2a84 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,10 +9,11 @@ env: - FEDORA_VERSION="3.5" before_install: - export ISLANDORA_DIR=$TRAVIS_BUILD_DIR - - $TRAVIS_BUILD_DIR/tests/travis_setup.sh + - $TRAVIS_BUILD_DIR/tests/scripts/travis_setup.sh - cd $HOME/drupal-* script: - ant -buildfile sites/all/modules/islandora/build.xml lint + - $ISLANDORA_DIR/tests/scripts/line_endings.sh sites/all/modules/islandora - drush dcs sites/all/modules/islandora - phpcpd --names *.module,*.inc,*.test sites/all/modules/islandora - drush test-run --uri=http://localhost:8081 Islandora diff --git a/tests/scripts/line_endings.sh b/tests/scripts/line_endings.sh new file mode 100755 index 00000000..b72dde22 --- /dev/null +++ b/tests/scripts/line_endings.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +RETURN=0 +FILES=`find -L $1 -name "*.info" -o -name "*.txt" -o -name "*.md"` +echo "Testing for files with DOS line endings..." +for FILE in $FILES +do + file $FILE | grep CRLF + if [ $? == 0 ] + then + RETURN=1 + fi +done +exit $RETURN diff --git a/tests/travis_setup.sh b/tests/scripts/travis_setup.sh similarity index 100% rename from tests/travis_setup.sh rename to tests/scripts/travis_setup.sh