Some errors copied in from DOS script
authorcantor <cantor@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 28 May 2004 19:18:49 +0000 (19:18 +0000)
committercantor <cantor@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 28 May 2004 19:18:49 +0000 (19:18 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1059 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

bin/extkeytool

index a9ad89a..2a070e2 100755 (executable)
@@ -1,21 +1,20 @@
-@echo off
-setlocal
-
-REM We need a JVM
-if not defined JAVA_HOME  (
-  echo Error: JAVA_HOME is not defined.
-  exit /b
-)
-
-if not defined JAVACMD (
-  set JAVACMD=%JAVA_HOME\bin\java.exe
-)
-
-if not exist %JAVACMD (
-  echo Error: JAVA_HOME is not defined correctly.
-  echo Cannot execute %JAVACMD
-  exit /b
-)
+#!/bin/sh
+
+##We need a JVM
+if [ ! -n "$JAVA_HOME" ] ; then
+  echo "Error: JAVA_HOME is not defined."
+  exit
+fi
+
+if [ ! -n "$JAVACMD" ] ; then
+  JAVACMD=$JAVA_HOME/bin/java
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly."
+  echo "Cannot execute $JAVACMD"
+  exit
+fi
 
 
 ##Find the shibboleth components