blob: 64a60d5ef465c8e71fb2dfd03ea6904dd6ff2752 (
plain)
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
|
#!/usr/bin/env python3
#
# Check whether a target exists in config.json
#
import json
import os
import sys
import utils
parser = utils.ArgParser(description='Runs configurations in json.conf.')
parser.add_argument('target',
help="The 'nightly' target the autobuilder is running")
args = parser.parse_args()
scriptsdir = os.path.dirname(os.path.realpath(__file__))
os.environ["SCRIPTSDIR"] = scriptsdir
ourconfig = utils.loadconfig()
# Find out if this target exists
if args.target in ourconfig['overrides']:
sys.exit(0)
sys.exit(1)
|