2012-04-06 13:10:11 +00:00
|
|
|
import os, os.path, sys
|
2012-12-04 02:15:38 +00:00
|
|
|
from optparse import OptionParser
|
2012-04-06 13:10:11 +00:00
|
|
|
|
|
|
|
forge_dir = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
mcp_dir = os.path.abspath('..')
|
|
|
|
|
2012-08-05 05:42:17 +00:00
|
|
|
from forge import build_forge_dev
|
2012-04-06 13:10:11 +00:00
|
|
|
|
|
|
|
def main():
|
2012-08-05 05:42:17 +00:00
|
|
|
|
2012-12-04 02:15:38 +00:00
|
|
|
parser = OptionParser()
|
|
|
|
parser.add_option('-m', '--mcp-dir', action='store', dest='mcp_dir', help='MCP Path', default=None)
|
|
|
|
parser.add_option('-b', '--build', action='store', dest='build', help='Build number', default=None)
|
|
|
|
options, _ = parser.parse_args()
|
|
|
|
|
|
|
|
build_num = 0
|
|
|
|
if not options.build is None:
|
2012-04-06 13:10:11 +00:00
|
|
|
try:
|
2012-12-04 02:15:38 +00:00
|
|
|
build_num = int(options.build)
|
2012-04-06 13:10:11 +00:00
|
|
|
except:
|
|
|
|
pass
|
2012-12-04 02:15:38 +00:00
|
|
|
|
2012-08-05 05:42:17 +00:00
|
|
|
fml_dir = os.path.join(forge_dir, 'fml')
|
2012-12-04 02:15:38 +00:00
|
|
|
mcp_dir = os.path.join(forge_dir, 'mcp')
|
|
|
|
|
|
|
|
if not options.mcp_dir is None:
|
|
|
|
mcp_dir = os.path.abspath(options.mcp_dir)
|
|
|
|
elif os.path.isfile(os.path.join('..', 'runtime', 'commands.py')):
|
|
|
|
mcp_dir = os.path.abspath('..')
|
|
|
|
|
2012-08-05 05:42:17 +00:00
|
|
|
sys.exit(build_forge_dev(mcp_dir, forge_dir, fml_dir, build_num))
|
2012-04-06 13:10:11 +00:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|