44 lines
1008 B
Bash
44 lines
1008 B
Bash
#!/bin/bash
|
|
# -*- mode: sh; tab-width: 8; coding: utf-8-unix -*-
|
|
|
|
prog=`basename $0 .bash`
|
|
ROLE=toxcore
|
|
PREFIX=/var/local
|
|
|
|
|
|
# we install into /var/local/bin and it takes precedence
|
|
# export PATH=$PREFIX/bin:$PATH
|
|
#. /var/local/src/var_local_src.bash || exit 2
|
|
[ `id -u` -eq 0 ] && ERROR $prog should not be run as root && exit 3
|
|
|
|
if [ "$#" -eq 0 ] ; then
|
|
cd $PREFIX/src || exit 2
|
|
WD=$PWD
|
|
|
|
bash c-toxcore.bash || exit 3$?
|
|
bash tox_profile.bash || 4$?
|
|
|
|
# sh toxcore_docker.bash || exit 4$?
|
|
|
|
exit 0
|
|
|
|
elif [ "$1" = 'check' ] ; then
|
|
exit 0
|
|
ols_run_checks_pip3
|
|
ols_run_tests_exit check || exit 10$?
|
|
exit $?
|
|
|
|
elif [ "$1" = 'lint' ] ; then
|
|
exit 0
|
|
ols_run_tests_shellcheck $ROLE || exit 2$?
|
|
ols_run_tests_exit $1 || exit 21$?
|
|
ols_run_tests_pylint || exit 22$?
|
|
|
|
elif [ "$1" = 'test' ] ; then
|
|
exit 0
|
|
ols_run_tests_exit $1 || exit 30$?
|
|
ols_gentoo_test_imports || exit 32$?
|
|
#hangs /usr/bin/expect gpgkey_test_gpg.exp foobar || exit 31$?
|
|
|
|
fi
|