git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [JGIT PATCH] Allow make_jgit.sh compilation under Cygwin or Mingw (MsysGit) with Windows JDK
@ 2008-08-21  9:33 Mike Ralphson
  2008-08-21  9:35 ` Imran M Yousuf
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Ralphson @ 2008-08-21  9:33 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git, Mike Ralphson

Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
---
 make_jgit.sh |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/make_jgit.sh b/make_jgit.sh
index 13d0e32..c119202 100755
--- a/make_jgit.sh
+++ b/make_jgit.sh
@@ -10,14 +10,24 @@ JARS="
 	org.spearce.jgit.pgm/lib/args4j-2.0.9.jar
 "
 
-if [ -n "$JAVA_HOME" ]
-then
-	PATH=$JAVA_HOME/bin:$PATH
-fi
-
+PSEP=":"
 T=".temp$$.$O"
 T_MF="$T.MF"
 R=`pwd`
+if [ "$OSTYPE" = "cygwin" ]
+then
+	R=`cygpath -m $R`
+	PSEP=";"
+fi
+if [ "$MSYSTEM" = "MINGW" ]
+then
+	PSEP=";"
+fi
+
+if [ -n "$JAVA_HOME" ]
+then
+	PATH=${JAVA_HOME}/bin${PSEP}${PATH}
+fi
 
 cleanup_bin() {
 	rm -f $T $O+ $T_MF
@@ -44,7 +54,7 @@ do
 	then
 		CLASSPATH="$R/$j"
 	else
-		CLASSPATH="$CLASSPATH:$R/$j"
+		CLASSPATH="${CLASSPATH}${PSEP}$R/$j"
 	fi
 done
 export CLASSPATH
@@ -61,7 +71,7 @@ do
 		-encoding UTF-8 \
 		-g \
 		-d ../bin2) || die "Building $p failed."
-	CLASSPATH="$CLASSPATH:$R/$p/bin2"
+	CLASSPATH="${CLASSPATH}${PSEP}$R/$p/bin2"
 done
 
 echo Manifest-Version: 1.0 >$T_MF &&
-- 
1.5.6.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [JGIT PATCH] Allow make_jgit.sh compilation under Cygwin or Mingw (MsysGit) with Windows JDK
  2008-08-21  9:33 [JGIT PATCH] Allow make_jgit.sh compilation under Cygwin or Mingw (MsysGit) with Windows JDK Mike Ralphson
@ 2008-08-21  9:35 ` Imran M Yousuf
  2008-08-21  9:48   ` Mike Ralphson
  0 siblings, 1 reply; 3+ messages in thread
From: Imran M Yousuf @ 2008-08-21  9:35 UTC (permalink / raw)
  To: Mike Ralphson; +Cc: Shawn O. Pearce, git, Mike Ralphson

On Thu, Aug 21, 2008 at 3:33 PM, Mike Ralphson <mike@abacus.co.uk> wrote:
> Signed-off-by: Mike Ralphson <mike@abacus.co.uk>

You can also have a look at the Maven project for JGit (will have
JGit-pgm mavenized once JGit's process is accepted). It should build
JGit uniformly on Windows and Linux.

http://repo.or.cz/w/egit/imyousuf.git?a=shortlog;h=refs/heads/mavenize-jgit

Best regards,

Imran

> ---
>  make_jgit.sh |   24 +++++++++++++++++-------
>  1 files changed, 17 insertions(+), 7 deletions(-)
>
> diff --git a/make_jgit.sh b/make_jgit.sh
> index 13d0e32..c119202 100755
> --- a/make_jgit.sh
> +++ b/make_jgit.sh
> @@ -10,14 +10,24 @@ JARS="
>        org.spearce.jgit.pgm/lib/args4j-2.0.9.jar
>  "
>
> -if [ -n "$JAVA_HOME" ]
> -then
> -       PATH=$JAVA_HOME/bin:$PATH
> -fi
> -
> +PSEP=":"
>  T=".temp$$.$O"
>  T_MF="$T.MF"
>  R=`pwd`
> +if [ "$OSTYPE" = "cygwin" ]
> +then
> +       R=`cygpath -m $R`
> +       PSEP=";"
> +fi
> +if [ "$MSYSTEM" = "MINGW" ]
> +then
> +       PSEP=";"
> +fi
> +
> +if [ -n "$JAVA_HOME" ]
> +then
> +       PATH=${JAVA_HOME}/bin${PSEP}${PATH}
> +fi
>
>  cleanup_bin() {
>        rm -f $T $O+ $T_MF
> @@ -44,7 +54,7 @@ do
>        then
>                CLASSPATH="$R/$j"
>        else
> -               CLASSPATH="$CLASSPATH:$R/$j"
> +               CLASSPATH="${CLASSPATH}${PSEP}$R/$j"
>        fi
>  done
>  export CLASSPATH
> @@ -61,7 +71,7 @@ do
>                -encoding UTF-8 \
>                -g \
>                -d ../bin2) || die "Building $p failed."
> -       CLASSPATH="$CLASSPATH:$R/$p/bin2"
> +       CLASSPATH="${CLASSPATH}${PSEP}$R/$p/bin2"
>  done
>
>  echo Manifest-Version: 1.0 >$T_MF &&
> --
> 1.5.6.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
Imran M Yousuf
Email: imran@smartitengineering.com
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [JGIT PATCH] Allow make_jgit.sh compilation under Cygwin or Mingw (MsysGit) with Windows JDK
  2008-08-21  9:35 ` Imran M Yousuf
@ 2008-08-21  9:48   ` Mike Ralphson
  0 siblings, 0 replies; 3+ messages in thread
From: Mike Ralphson @ 2008-08-21  9:48 UTC (permalink / raw)
  To: Imran M Yousuf; +Cc: Shawn O. Pearce, git

2008/8/21 Imran M Yousuf <imyousuf@gmail.com>:
> On Thu, Aug 21, 2008 at 3:33 PM, Mike Ralphson <mike@abacus.co.uk> wrote:
>> Signed-off-by: Mike Ralphson <mike@abacus.co.uk>
>
> You can also have a look at the Maven project for JGit (will have
> JGit-pgm mavenized once JGit's process is accepted). It should build
> JGit uniformly on Windows and Linux.
>
> http://repo.or.cz/w/egit/imyousuf.git?a=shortlog;h=refs/heads/mavenize-jgit

A bit heavyweight for me, as I don't use Maven for anything else, but
a good pointer for others.

Thanks,

Mike

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-21  9:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-21  9:33 [JGIT PATCH] Allow make_jgit.sh compilation under Cygwin or Mingw (MsysGit) with Windows JDK Mike Ralphson
2008-08-21  9:35 ` Imran M Yousuf
2008-08-21  9:48   ` Mike Ralphson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).