File: .travis-ci.sh

package info (click to toggle)
ola 0.9.1-1.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 21,340 kB
  • ctags: 23,021
  • sloc: cpp: 129,922; python: 12,265; sh: 11,778; makefile: 2,288; ansic: 1,775; java: 518; xml: 214
file content (24 lines) | stat: -rwxr-xr-x 695 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

CPP_LINT_URL="http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py";

if [[ $TASK = 'lint' ]]; then
  # run the lint tool only if it is the requested task
  wget -O cpplint.py $CPP_LINT_URL;
  chmod u+x cpplint.py;
  ./cpplint.py \
    --filter=-legal/copyright,-readability/streams,-runtime/arrays \
    $(find ./ -name "*.h" -or -name "*.cpp" | xargs)
  if [[ $? -ne 0 ]]; then
    exit 1;
  fi;
elif [[ $TASK = 'check-licences' ]]; then
  # check licences only if it is the requested task
  ./scripts/enforce_licence.py
  if [[ $? -ne 0 ]]; then
    exit 1;
  fi;
else
  # Otherwise compile and check as normal
  autoreconf -i && ./configure && make distcheck
fi