https://github.com/tdfischer/buildenv
https://github.com/tdfischer/buildenv
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tdfischer/buildenv
- Owner: tdfischer
- Created: 2012-08-24T19:52:50.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2015-06-08T17:27:03.000Z (about 11 years ago)
- Last Synced: 2025-06-07T15:06:04.902Z (about 1 year ago)
- Language: Shell
- Size: 301 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Writing an environment:
Place it in environments//_load.sh
When unloaded, it will execute environments//_teardown.sh
Add hooks to environments//.sh
# Extensions
Extensions are small plugins for buildenv that provide extra functionality,
such as prompt information, support for other buildsystems, environment
variables, etc.
To enable an extension, edit $BUILDENV_HOME/config/$USER.sh and add the
following:
buildenv_load_extension extension-name
## Available extensions:
### vim
### pkgconfig
### cmake
### git
### autojump
### autocomplete
### prompt
# Available hooks:
## Special hooks:
Hooks that begin with an underscore handle special events that
affect a single buildenv or extension.
_load
Called once, when the environment or extension is loaded.
A great place to define any library functions needed.
_teardown
Called once, when the environment or extension is unloaded.
A great place to run any cleanup code, such as undefining functions.
## Normal hooks
These hooks represent various events in the buildenv system.
buildenv-loaded
A new buildenv is loaded
buildenv-unloaded
A buildenv is unloaded
buildenv-changed
The current 'master' buildenv is changed
init
Buildenv is completely loaded
report
Called from within buildenv_report.
restore-all
_buildenv_restore_all is about to restore the environment to original values
load-config
A configuration is activated.
firstrun
'buildenv' was executed for the first time.
Useful for any kind of initialization you'd otherwise want to delay until
you know the user will be actually using buildenv.
prompt
Whenever the shell prompt is regenerated.
WARNING: This function needs to be pretty much *instant*, as bash does not
show the prompt 'till it is done.
# Update Mechanism
There is a rudimentary update mechanism that assumes $BUILDENV_HOME is a git
repository, originally cloned from somewhere (has an 'origin' remote).
To use, run buildenv_update