Merge pull request #4 from masaru-b-cl/create-install-script-for-msysgit

Create install script for msysgit
This commit is contained in:
Motonori Iwata 2012-06-25 02:37:59 -07:00
commit 29ecf8eb5c
4 changed files with 42 additions and 1 deletions

View file

@ -50,6 +50,17 @@ If you prefer a manual installation, please use the following instructions:
$ git clone --recursive git://github.com/iwata/git-now.git
#### for Windows
Then, you can install `git-now`, using:
> .\contrib\msysgit-install.bat
By default, git-now will be installed in %HOME%, If %HOME% is not defined be installed in %UserProfile%\bin.
*note : shFlags needs "getopt.exe" or others, Reffer to [gitflow installation document] (https://github.com/nvie/gitflow/wiki/Windows).*
#### for Others
Then, you can install `git-now`, using:
$ sudo make install

4
contrib/exclude.txt Normal file
View file

@ -0,0 +1,4 @@
.gitmodules
Makefile
README.mdown
gitnow-shFlags

View file

@ -0,0 +1,23 @@
set STARTUP_PATH=%~d0%~p0
if "%HOME%" == "" goto sethome
goto makedir
:sethome
echo set HOME variable
set HOME=%UserProfile%
:makedir
if not exist %HOME%\bin goto :copyshflags
echo make bin folder
mkdir %HOME%\bin
set MSYS_BIN=%HOME%\bin
echo Installing git-now to "%MSYS_BIN%"
:copyshflags
echo copy shFlags
copy %STARTUP_PATH%..\shFlags\src\shflags %MSYS_BIN%\gitnow-shFlags
:copygitnow
xcopy /EXCLUDE:%STARTUP_PATH%exclude.txt /D /Y %STARTUP_PATH%..\* %MSYS_BIN%

View file

@ -5,7 +5,10 @@ if [ "$DEBUG" = "yes" ]; then
set -x
fi
export GITNOW_DIR=$(dirname "$0")
GITNOW_DIR=$0
GITNOW_DIR=${GITNOW_DIR%\\*} # for msysGit
GITNOW_DIR=${GITNOW_DIR%/*} # for others
export GITNOW_DIR
PREFIX="from now"
usage() {