forked from aboutcode-org/scancode-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·50 lines (36 loc) · 1.26 KB
/
configure
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
#!/usr/bin/env bash
#
# Copyright (c) nexB Inc. http://www.nexb.com/ - All rights reserved.
#
set -e
if [[ "$OS" == "Windows_NT" ]]; then
echo "You seem to be running on Windows under Cygwin / MSYS(2), like e.g. Git for Windows Bash. This script does"
echo "not properly work in this scenario. As a Windows user, please run 'configure.bat' from a regular command"
echo "prompt instead."
exit 1
fi
################################
# change these variables to customize this script locally
################################
# you can define one or more thirdparty dirs, each prefixed with TPP_DIR
export TPP_DIR="thirdparty"
# default configurations for dev
CONF_DEFAULT="etc/conf/dev"
if [[ "$CONF_DEFAULT" == "etc/conf/dev" ]]; then
export TPP_DIR_DEV="thirdparty/dev"
fi
#################################
CFG_CMD_LINE_ARGS="$@"
if [[ "$1" == "" ]]; then
# default for dev conf if not argument is provided
CFG_CMD_LINE_ARGS=$CONF_DEFAULT
fi
CONFIGURE_ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [[ "$PYTHON_EXE" == "" ]]; then
PYTHON_EXE=python
fi
$PYTHON_EXE "$CONFIGURE_ROOT_DIR/etc/configure.py" $CFG_CMD_LINE_ARGS
if [ -f "$CONFIGURE_ROOT_DIR/bin/activate" ]; then
source "$CONFIGURE_ROOT_DIR/bin/activate"
fi
set +e