Skip to content

Commit

Permalink
Update configuration #190
Browse files Browse the repository at this point in the history
  • Loading branch information
chinyeungli committed Jun 18, 2015
1 parent 2a963b9 commit ad7571e
Show file tree
Hide file tree
Showing 11 changed files with 388 additions and 363 deletions.
24 changes: 20 additions & 4 deletions configure
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
#!/bin/bash
#
# Copyright (c) 2014 nexB Inc. http://www.nexb.com/ - All rights reserved.
# Copyright (c) 2015 nexB Inc. http://www.nexb.com/ - All rights reserved.
#
################################
# 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
CONF_DEFAULT="etc/conf"
#################################

CFG_CMD_LINE_ARGS="$@"

if [ "$1" == "--init" ]; then
CFG_CMD_LINE_ARGS=$CONF_INIT
fi

if [ "$1" == "" ]; then
# default configuration if not argument is provided
CFG_CMD_LINE_ARGS="etc/conf"
# default conf if not argument is provided
CFG_CMD_LINE_ARGS=$CONF_DEFAULT
fi

source etc/configure $CFG_CMD_LINE_ARGS
python2.7 etc/configure.py $CFG_CMD_LINE_ARGS
if [ -f "bin/activate" ]; then
source bin/activate
fi
34 changes: 27 additions & 7 deletions configure.bat
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
@echo OFF
@rem Copyright (c) 2014 nexB Inc. http://www.nexb.com/ - All rights reserved.

set ABOUT_ROOT_DIR=%~dp0
@rem Copyright (c) 2015 nexB Inc. http://www.nexb.com/ - All rights reserved.

@rem ################################
@rem # change these variables to customize this script locally
@rem ################################
@rem # you can define one or more thirdparty dirs, each prefixed with TPP_DIR
set TPP_DIR=thirdparty


@rem # default configurations
set CONF_DEFAULT="etc/conf"
@rem #################################

set CFG_CMD_LINE_ARGS=
@rem Collect all command line arguments in a variable
@rem Collect/Slurp all command line arguments in a variable
:collectarg
if ""%1""=="""" goto continue
if ""%1""=="""" (
goto continue
)
call set CFG_CMD_LINE_ARGS=%CFG_CMD_LINE_ARGS% %1
shift
goto collectarg
Expand All @@ -15,12 +27,20 @@ set CFG_CMD_LINE_ARGS=

@rem default configuration when no args are passed
if "%CFG_CMD_LINE_ARGS%"==" " (
set CFG_CMD_LINE_ARGS=etc/conf
set CFG_CMD_LINE_ARGS="%CONF_DEFAULT%"
goto configure
)

if "%CFG_CMD_LINE_ARGS%"==" --init" (
set CFG_CMD_LINE_ARGS="%CONF_INIT%"
goto configure
)

:configure
call %ABOUT_ROOT_DIR%\etc\configure %CFG_CMD_LINE_ARGS%
call c:\Python27\python.exe etc/configure.py %CFG_CMD_LINE_ARGS%
if exist bin\activate (
bin\activate
)
goto EOS

:EOS
:EOS
17 changes: 0 additions & 17 deletions etc/conf/dev/eclipse.project.in

This file was deleted.

9 changes: 0 additions & 9 deletions etc/conf/dev/eclipse.pydevproject.posix.in

This file was deleted.

9 changes: 0 additions & 9 deletions etc/conf/dev/eclipse.pydevproject.win.in

This file was deleted.

3 changes: 0 additions & 3 deletions etc/conf/dev/posix.sh

This file was deleted.

3 changes: 0 additions & 3 deletions etc/conf/dev/win.bat

This file was deleted.

52 changes: 0 additions & 52 deletions etc/configure

This file was deleted.

88 changes: 0 additions & 88 deletions etc/configure.bat

This file was deleted.

0 comments on commit ad7571e

Please sign in to comment.