2010-11-12 22:47:03 -08:00
|
|
|
import os
|
2010-11-16 04:13:17 -08:00
|
|
|
import atoi
|
2010-11-12 22:47:03 -08:00
|
|
|
|
2010-11-22 02:45:00 -08:00
|
|
|
if not os.environ.get('REDO'):
|
|
|
|
|
import sys
|
|
|
|
|
sys.stderr.write('%s: error: must be run from inside a .do\n'
|
|
|
|
|
% sys.argv[0])
|
|
|
|
|
sys.exit(100)
|
|
|
|
|
|
2010-11-21 03:34:32 -08:00
|
|
|
PWD = os.environ.get('REDO_PWD', '')
|
2010-11-13 00:11:34 -08:00
|
|
|
TARGET = os.environ.get('REDO_TARGET', '')
|
|
|
|
|
DEPTH = os.environ.get('REDO_DEPTH', '')
|
2010-11-16 04:13:17 -08:00
|
|
|
DEBUG = atoi.atoi(os.environ.get('REDO_DEBUG', ''))
|
2010-11-21 06:23:41 -08:00
|
|
|
DEBUG_LOCKS = os.environ.get('REDO_DEBUG_LOCKS', '') and 1 or 0
|
2010-11-22 01:50:46 -08:00
|
|
|
DEBUG_PIDS = os.environ.get('REDO_DEBUG_PIDS', '') and 1 or 0
|
2010-11-13 00:11:34 -08:00
|
|
|
VERBOSE = os.environ.get('REDO_VERBOSE', '') and 1 or 0
|
2010-11-21 06:35:52 -08:00
|
|
|
XTRACE = os.environ.get('REDO_XTRACE', '') and 1 or 0
|
2010-11-21 07:10:48 -08:00
|
|
|
KEEP_GOING = os.environ.get('REDO_KEEP_GOING', '') and 1 or 0
|
2010-11-16 00:14:57 -08:00
|
|
|
SHUFFLE = os.environ.get('REDO_SHUFFLE', '') and 1 or 0
|
2010-11-21 03:09:21 -08:00
|
|
|
STARTDIR = os.environ['REDO_STARTDIR']
|
|
|
|
|
BASE = os.environ['REDO_BASE']
|
|
|
|
|
while BASE and BASE.endswith('/'):
|
|
|
|
|
BASE = BASE[:-1]
|