Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

NUTCH-327 fix log path under cygwin

Sami Siren6feface01a99
diff --git a/CHANGES.txt b/CHANGES.txt
index cc7c3ded8..59ea6e87c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -206,6 +206,8 @@ Trunk (unreleased changes)
73. NUTCH-293 - Support for Crawl-Delay (Stefan Groschupf via ab)
+74. NUTCH-327 - Fixed logging directory on cygwin (siren)
+
Release 0.7 - 2005-08-17
1. Added support for "type:" in queries. Search results are limited/qualified
diff --git a/bin/nutch b/bin/nutch
index 1ba4fed2e..a2ab662ac 100755
--- a/bin/nutch
+++ b/bin/nutch
@@ -11,6 +11,10 @@
#
# NUTCH_OPTS Extra Java runtime options.
#
+cygwin=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+esac
# resolve links - $0 may be a softlink
THIS="$0"
@@ -128,6 +132,12 @@ fi
if [ "$NUTCH_LOGFILE" = "" ]; then
NUTCH_LOGFILE='hadoop.log'
fi
+
+#Fix log path under cygwin
+if $cygwin; then
+ NUTCH_LOG_DIR=`cygpath -p -w "$NUTCH_LOG_DIR"`
+fi
+
NUTCH_OPTS="$NUTCH_OPTS -Dhadoop.log.dir=$NUTCH_LOG_DIR"
NUTCH_OPTS="$NUTCH_OPTS -Dhadoop.log.file=$NUTCH_LOGFILE"
@@ -173,7 +183,7 @@ else
fi
# cygwin path translation
-if expr `uname` : 'CYGWIN*' > /dev/null; then
+if $cygwin; then
CLASSPATH=`cygpath -p -w "$CLASSPATH"`
fi