Make Groonga build easy. Inspired by rbenv.
- Bash
- Autotools
$ git clone https://github.com/myokoym/grnenv ~/.grnenv
$ export GRNENV_HOME=~/.grnenv
$ export PATH=$GRNENV_HOME/bin:$GRNENV_HOME/shims:$PATH
$ grnenv build 5.1.2 # Specify Groonga version
$ grnenv global 5.1.2
$ groonga --version # 5.1.2
$ cd ..
$ groonga --version # 5.1.2
$ grnenv build 1.0.0
...
$ grnenv local 1.0.0
$ cat .groonga-version
1.0.0
$ groonga --version # 1.0.0
$ cd ..
$ groonga --version # 5.1.2
If Groonga is installed in /tmp/local
:
$ grnenv local system
$ cat .groonga-version
system
$ which groonga
/tmp/local/bin/groonga
The following command exports the current version's paths to LD_LIBRARY_PATH
and PKG_CONFIG_PATH
.
$ eval "$(grnenv export)"
$ grnenv plugin-install https://github.com/myokoym/groonga-plugin-default_encoding
$ grnenv plugin-uninstall groonga-plugin-default_encoding