UNDER DEVELOPMENT
This project is a set of (Bourne again) shell scripts to align the environment for developing SOLVCON and related projects in (Ubuntu) Linux and macOS. The features include:
- Build dependencies from source and retain the source code for debugger.
- Unprivileged installation. No root permission is required.
- Switchable environments.
- Download source code from a repository or a tarball.
Clone the repository to where you want to install, usually somewhere under your home directory (e.g., ~/devenv):
git clone git@github.com:solvcon/devenv.git ~/devenv(Or use https:)
git clone https://github.com/solvcon/devenv ~/devenvDEVENV requires bash and you need to turn it on in the shell:
source ~/devenv/scripts/initIt can be done automatically if you add the following line in the startup file (~/.bashrc or ~/.bash_profile):
if [ -f ~/devenv/scripts/init ]; then source ~/devenv/scripts/init; fiThe tool uses a bash function devenv for all its commends:
$ devenv no active flavor: $DEVENVFLAVOR not defined Usage: devenv [command] Description: Tool to manage development environment in console Variables: DEVENVROOT=/path/to DEVENVDLROOT=/path/to/var/downloaded DEVENVFLAVOR= DEVENVFLAVORROOT=/path/to/flavors DEVENVCURRENTROOT=/dev/null Commands: list - list all available environments use - activate an environment off - deactivate the environment add - create a new environment directory del - delete a existing environment directory build - build a package in the active environment launch - launch an application show - print the current environmentThere is no environment ("flavor") available in the beginning. You need to create one using devenv add:
$ devenv add prime create 'prime' dev environment.The new flavor will be shown in the list:
$ devenv list primeAdding a flavor does not enable it:
$ devenv show no flavor in useRun the following command to use (enable) the flavor prime we just created:
$ devenv use prime now using 'prime' $ devenv show current flavor is primeWe can turn the flavor off:
$ devenv off 'prime' to be turned off $ devenv show no flavor in useShared library (-fPIC) should be preferred in the build script for a package because it saves memory for the applications using the dependency.
shunit2 is used as the unit-test framework. The test cases are placed in <root>/tests. To run the unit tests, shunit2 needs to be initialized:
git submodule update --initGo to <root>/tests and run the test driver:
$ cd tests $ ./runner.shYou may also initialize the test library while cloning the repository:
git clone git@github.com:solvcon/devenv.git --recurse-submodules