forked from sighthoundinc/SighthoundVideo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run
executable file
·66 lines (59 loc) · 1.99 KB
/
run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
#*****************************************************************************
#
# run
# Script for running SV in dev environment
#
#
#*****************************************************************************
#
#
# Copyright 2013-2022 Sighthound, Inc.
#
# Licensed under the GNU GPLv3 license found at
# https://www.gnu.org/licenses/gpl-3.0.txt
#
# Alternative licensing available from Sighthound, Inc.
# by emailing [email protected]
#
# This file is part of the Sighthound Video project which can be found at
# https://github.com/sighthoundinc/SighthoundVideo
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; using version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.
#
#
#*****************************************************************************
#
# Handy shell script for running the passed command in our environment.
if [ "$#" == "0" -o "$1" == "--help" ]; then
echo "Usage: $0 commandToRun [args]"
exit 1
fi
# Run the "setupEnvironment" script to get our PATH updated, and make sure to
# tell it that we wish to run from source by setting the DEVEL_ENV environment
# variable to 1.
DEVEL_ENV=1
source setupEnvironment
# Run!
set +e
pycheckLoc=`which doPycheck 2> /dev/null`
if [ "`basename $1 .py`.py" != "`basename $1`" ]; then
# The thing we're running doesn't end with ".py", so just run it directly.
"$@"
elif [ -z "$pycheckLoc" ]; then
echo Pychecker script not found--running directly...
"$@"
else
doPycheck --run "$@"
fi