summaryrefslogtreecommitdiff
path: root/src/gfeditor.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/gfeditor.in')
-rw-r--r--src/gfeditor.in31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/gfeditor.in b/src/gfeditor.in
index 9a390195b..129cd5e1f 100644
--- a/src/gfeditor.in
+++ b/src/gfeditor.in
@@ -1,26 +1,32 @@
#!/bin/sh
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-GF_BIN_DIR=@bindir@
-GF_DATA_DIR=@datadir@/GF-@PACKAGE_VERSION@
+prefix="@prefix@"
+
+case "@host@" in
+ *-cygwin)
+ prefix=`cygpath -w "$prefix"`;;
+esac
+
+exec_prefix="@exec_prefix@"
+GF_BIN_DIR="@bindir@"
+GF_DATA_DIR="@datadir@/GF-@PACKAGE_VERSION@"
JAVA="@JAVA@"
-GF=$GF_BIN_DIR/gf
-JARFILE=$GF_DATA_DIR/gfeditor.jar
+GF="$GF_BIN_DIR/gf"
+JARFILE="$GF_DATA_DIR/gfeditor.jar"
if [ ! -x "${JAVA}" ]; then
JAVA=`which java`
fi
if [ ! -x "${JAVA}" ]; then
- echo "No Java VM found"
+ echo "No Java VM found."
exit 1
fi
-if [ ! -f "${JARFILE}" ]; then
- echo "JAR file ${JARFILE} not found"
+if [ ! -r "${JARFILE}" ]; then
+ echo "Cannot read JAR file ${JARFILE}."
exit 1
fi
@@ -29,11 +35,8 @@ if [ ! -x "${GF}" ]; then
fi
if [ ! -x "${GF}" ]; then
- echo "gf not found"
+ echo "GF not found."
exit 1
fi
-COMMAND= ${JAVA} -jar ${JARFILE} -g $GF $*
-
-echo ${COMMAND}
-exec ${COMMAND}
+exec "${JAVA}" -jar "${JARFILE}" -g "${GF}" $*