From 93e0ef1670ec72b4a738c5a6e3abccf5409c84f4 Mon Sep 17 00:00:00 2001 From: Karsten Dambekalns Date: Mon, 23 Oct 2023 11:54:45 +0200 Subject: [PATCH] Adjust manual install part in README.md --- README.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 4688ff4..e9208a7 100644 --- a/README.md +++ b/README.md @@ -135,24 +135,26 @@ Manual Installation ------------------- If you want to contribute to `splitsh-lite` or use it as a library, you first -need to install `libgit2`: - -```bash -go get -d github.com/libgit2/git2go -cd $GOPATH/src/github.com/libgit2/git2go -git checkout next -git submodule update --init -make install -``` +need to install `libgit2` in version `1.5`, preferably using your package manager of choice. Then, compile `splitsh-lite`: ```bash -go get github.com/splitsh/lite +go get go build -o splitsh-lite github.com/splitsh/lite ``` If everything goes fine, a `splitsh-lite` binary should be available in the current directory. +If you get errors about an incompatible `libgit2` library, try exporting the needed flags, e.g. + +```bash +export LDFLAGS="-L/opt/homebrew/opt/libgit2@1.5/lib" +export CPPFLAGS="-I/opt/homebrew/opt/libgit2@1.5/include" +export PKG_CONFIG_PATH="/opt/homebrew/opt/libgit2@1.5/lib/pkgconfig" +``` + +before running `go build`. + [1]: https://github.com/splitsh/lite/releases