Debian Codegraph @

ci/travis.sh

raw
1 #!/bin/bash
2 # Copyright (c) 2007-2018 The OpenRC Authors.
3 # See the Authors file at the top-level directory of this distribution and
4 # https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
5 #
6 # This file is part of OpenRC. It is subject to the license terms in
7 # the LICENSE file found in the top-level directory of this
8 # distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
9 # This file may not be copied, modified, propagated, or distributed
10 # except according to the terms contained in the LICENSE file.
11
12 set -e
13 set -u
14 set -x
15
16 # These are steps to run on TravisCI under a containerized Ubuntu system.
17 # See $TOP/.travis.yml for more info about the TravisCI setup.
18
19 # Run shellcheck, but don't fail (yet):
20 shellcheck --version
21 for shellscript in $(git ls-files); do
22 case $shellscript in
23 init.d/*.in) ;;
24 sh/*.in) ;;
25 sh/*.sh) ;;
26 support/init.d.examples/*.in) ;;
27 support/openvpn/*.sh) ;;
28 support/sysvinit/halt.sh) ;;
29 test/*.sh) ;;
30 *) continue ;;
31 esac
32 echo "Checking ${shellscript} with shellcheck:"
33 shellcheck -s sh "${shellscript}" || true
34 done
35
36 cpus=$(getconf _NPROCESSORS_CONF || echo 1)
37 # make on TravisCI doesn't support -O yet
38 make -j"${cpus}"
39
40 make test