From cc1b6360da43ec87f99ebedafec51ce4771f01f8 Mon Sep 17 00:00:00 2001 From: "TAKANO Sho / @masaru_b_cl" Date: Mon, 25 Jun 2012 13:04:10 +0900 Subject: [PATCH 1/5] Create install script for msysgit --- contrib/exclude.txt | 4 ++++ contrib/msysgit-install.cmd | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 contrib/exclude.txt create mode 100644 contrib/msysgit-install.cmd diff --git a/contrib/exclude.txt b/contrib/exclude.txt new file mode 100644 index 0000000..7c15bf0 --- /dev/null +++ b/contrib/exclude.txt @@ -0,0 +1,4 @@ +.gitmodules +Makefile +README.mdown +gitnow-shFlags diff --git a/contrib/msysgit-install.cmd b/contrib/msysgit-install.cmd new file mode 100644 index 0000000..27a9fc2 --- /dev/null +++ b/contrib/msysgit-install.cmd @@ -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 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 %STARTUP_PATH%..\* %MSYS_BIN% From 21e70e0a199409b0e7b9193a41845f1d584b3be6 Mon Sep 17 00:00:00 2001 From: "TAKANO Sho / @masaru_b_cl" Date: Mon, 25 Jun 2012 14:31:29 +0900 Subject: [PATCH 2/5] adding git-now instllation for msysgit to README.mdown. --- README.mdown | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.mdown b/README.mdown index c2fd1f7..e44be33 100644 --- a/README.mdown +++ b/README.mdown @@ -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 From 6811daf5cbae0d700287c5d0e3957600ab5128e2 Mon Sep 17 00:00:00 2001 From: "TAKANO Sho / @masaru_b_cl" Date: Mon, 25 Jun 2012 16:04:50 +0900 Subject: [PATCH 3/5] changed getting $GITNOW_DIR value for msysGit. --- git-now | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-now b/git-now index 2b346fe..ca4dd30 100755 --- a/git-now +++ b/git-now @@ -5,7 +5,7 @@ if [ "$DEBUG" = "yes" ]; then set -x fi -export GITNOW_DIR=$(dirname "$0") +export GITNOW_DIR=${0%\\*} PREFIX="from now" usage() { From 067eb03194eec83474faee79c6d229c7fca10ffc Mon Sep 17 00:00:00 2001 From: "TAKANO Sho / @masaru_b_cl" Date: Mon, 25 Jun 2012 16:18:31 +0900 Subject: [PATCH 4/5] fixed bug : changing condition of shFlags existance. --- contrib/msysgit-install.cmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/msysgit-install.cmd b/contrib/msysgit-install.cmd index 27a9fc2..77d958b 100644 --- a/contrib/msysgit-install.cmd +++ b/contrib/msysgit-install.cmd @@ -7,7 +7,7 @@ echo set HOME variable set HOME=%UserProfile% :makedir -if exist %HOME%\bin goto :copyshflags +if not exist %HOME%\bin goto :copyshflags echo make bin folder mkdir %HOME%\bin @@ -20,4 +20,4 @@ echo copy shFlags copy %STARTUP_PATH%..\shFlags\src\shflags %MSYS_BIN%\gitnow-shFlags :copygitnow -xcopy /EXCLUDE:%STARTUP_PATH%exclude.txt /D %STARTUP_PATH%..\* %MSYS_BIN% +xcopy /EXCLUDE:%STARTUP_PATH%exclude.txt /D /Y %STARTUP_PATH%..\* %MSYS_BIN% From 458b2a2b05dc311fc5cfc2b1791711b4b2365fab Mon Sep 17 00:00:00 2001 From: "TAKANO Sho / @masaru_b_cl" Date: Mon, 25 Jun 2012 16:28:19 +0900 Subject: [PATCH 5/5] changed getting $GITNOW_DIR value for msysGit or others. --- git-now | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git-now b/git-now index ca4dd30..4e3efe5 100755 --- a/git-now +++ b/git-now @@ -5,7 +5,10 @@ if [ "$DEBUG" = "yes" ]; then set -x fi -export GITNOW_DIR=${0%\\*} +GITNOW_DIR=$0 +GITNOW_DIR=${GITNOW_DIR%\\*} # for msysGit +GITNOW_DIR=${GITNOW_DIR%/*} # for others +export GITNOW_DIR PREFIX="from now" usage() {