grnenv-rs is a tool to switch using multiple Groonga versions.
Currently, only confirmed to work on Windows 10, macOS Sierra(10.12), and Ubuntu Trusty (14.04 LTS).
- Visual C++ Redistributable for Visual Studio 2015
x86_64 msvc target binaries are found at: https://github.com/cosmo0920/grnenv-rs/releases
And then, put binaries into $Env:USERPROFILE\bin.
- rustup
Prepare the following dependent libraries:
- C and C++ compilers like gcc or clang
- autoconf
- automake
- libtool
- pkg-config
- pcre
x86_64 musl Linux binaries are found at: https://github.com/cosmo0920/grnenv-rs/releases
- grnenv-rs-VERSION-x86_64-unknown-linux-musl.tar.xz
And then, put binaries into $HOME\bin.
x86_64 macOS binaries are found at: https://github.com/cosmo0920/grnenv-rs/releases
- grnenv-rs-VERSION-x86_64-apple-darwin.zip
And then, put binaries into $HOME\bin.
Prepare the following toolchain:
- rust compiler (installed with rustup)
And then,
$ cargo install grnenv-rsThis tool has plugin system, which is using subcommand mechanism.
You should put grnenv-* executables into $PATH or ~/bin.
In Windows, grnenv-* subcommand should be portable executables.
If you want to support Windows in subcommand, it recommends to use Rust language and build (i686|x86_64)-pc-windows-msvc target.
PS> grnenv initAnd then, Please create profile.ps1 with the following command:
notepad $profile.CurrentUserCurrentHostAnd write the following thing:
. $Env:USERPROFILE\.groonga\shims\bin\source-groonga.ps1then,
PS> grnenv install VERSION [--arch (x86|x64)]
PS> grnenv switch VERSION [--arch (x86|x64)]Finally, restart powershell and use specified version of Groonga.
If you get an error, you should specify execution policy as follows:
PS> Set-ExecutionPolicy RemoteSigned$ grnenv initAnd write the following content into .bash_profile or .zsh_profile etc.:
. $HOME/.groonga/shims/bin/source-groonga.shthen,
$ grnenv install VERSION
$ grnenv switch VERSIONFinally, restart your shell and use specified version of Groonga.
MIT.
- 複数の環境で動作するバージョン切り替えツールのgrnenv-rsを作ってみたお話 http://qiita.com/cosmo0920/items/0a975fb4509114e9b189