-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to install on windows (#79)
* Added some paths that were missing on Windows * Conditionalized 'make install' * Set direction to execute install.sh with bash
- Loading branch information
1 parent
dd5d887
commit cb2cec9
Showing
2 changed files
with
37 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
unameOut="$(uname -s)" | ||
case "${unameOut}" in | ||
Linux*) machine=Linux;; | ||
Darwin*) machine=Mac;; | ||
CYGWIN*) machine=Cygwin;; | ||
MINGW*) machine=MinGw;; | ||
*) machine="UNKNOWN:${unameOut}" | ||
esac | ||
|
||
if [[ $machine == MinGw ]] | ||
then | ||
# Everything here is ugly. But MinGW seem to have no ldconfig, | ||
# no respect to /usr/local/bin, /usr/local/lib | ||
cp ./libgit2/install/bin/libgit2.dll /usr/bin/ | ||
cp ./gitql.exe /usr/bin/gitql.exe | ||
ln -s -f /usr/bin/gitql.exe /usr/bin/git-ql | ||
echo "Gitql.exe is in /usr/bin/gitql.exe" | ||
echo "You can also use: git ql 'query here'" | ||
else | ||
cp ./libgit2/install/lib/lib* /usr/local/lib/ | ||
ldconfig /usr/local/lib >/dev/null 2>&1 || echo "ldconfig not found">/dev/null | ||
cp ./gitql /usr/local/bin/gitql | ||
ln -s -f /usr/local/bin/gitql /usr/local/bin/git-ql | ||
echo "Git is in /usr/local/bin/gitql" | ||
echo "You can also use: git ql 'query here'" | ||
fi | ||
|
||
|