summaryrefslogtreecommitdiff
path: root/scripts/builder/main.py
authorGiulio Cesare Solaroli <giulio.cesare@solaroli.it>2011-10-05 22:54:04 (UTC)
committer Giulio Cesare Solaroli <giulio.cesare@solaroli.it>2011-10-05 22:54:04 (UTC)
commit13ebf1b1987a1566d081ff1ba89b4dca197b7d2e (patch) (side-by-side diff)
treedcd7121febab3bd2c1436d2f55a5a2ac07ad2e83 /scripts/builder/main.py
parentbbd415769410aac765f889e74a28992bc8483f94 (diff)
parent2a98e81b954ab84efc8d3f4e1d837bf190f77d7d (diff)
downloadclipperz-13ebf1b1987a1566d081ff1ba89b4dca197b7d2e.zip
clipperz-13ebf1b1987a1566d081ff1ba89b4dca197b7d2e.tar.gz
clipperz-13ebf1b1987a1566d081ff1ba89b4dca197b7d2e.tar.bz2
Merge pull request #7 from themiurgo/master
Fixes shebang for python builder scripts
Diffstat (limited to 'scripts/builder/main.py') (more/less context) (ignore whitespace changes)
-rwxr-xr-xscripts/builder/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/builder/main.py b/scripts/builder/main.py
index ba0c72a..94f738f 100755
--- a/scripts/builder/main.py
+++ b/scripts/builder/main.py
@@ -1,33 +1,33 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import sys, os, json
import shutil
import pprint
import frontendBuilder
import codecs
import itertools
from collections import deque
from phpBuilder import PhpBuilder
from pythonBuilder import PythonBuilder
pp = pprint.PrettyPrinter(indent=4, depth=4)
#--------------------------------------------------------------------
def scriptDir ():
return os.path.dirname(sys.argv[0])
def projectBaseDir ():
return os.path.abspath(scriptDir() + '/../..')
def projectTargetDir():
return projectBaseDir() + '/target/'
#--------------------------------------------------------------------
def createFolder (path):
if not os.path.exists(path):
os.makedirs(path)
@@ -134,33 +134,33 @@ def main ():
if len(parameters) > 0:
parameter = parameters.popleft()
if parameter == "--ALL":
settings['frontends'] = ['beta', 'gamma', 'mobile']
settings['backends'] = ['php', 'python', 'java']
else:
while parameter != None:
values = list(itertools.takewhile(lambda x: not x.startswith('--'), parameters))
if parameter == "--backends":
settings['backends'] = values
elif parameter == "--frontends":
settings['frontends'] = values
parameters = deque(itertools.dropwhile(lambda x: not x.startswith('--'), parameters))
if parameters:
parameter = parameters.popleft()
else:
parameter = None
if (not settings.has_key('versions')):
usage("missing 'versions'")
if (not settings.has_key('frontends')):
usage("missing 'frontends'")
if (not settings.has_key('backends')):
usage("missing 'backends'")
build (settings)
if __name__ == "__main__":
- main() \ No newline at end of file
+ main()