ISSUE-436 Avoid using return text because it can change on different locales. Avoid create a catch-all for OSes we don't recognize directly.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@2374 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Stefano Mazzocchi 2011-11-16 00:32:02 +00:00
parent 73a9785372
commit 6692a968be

13
refine
View File

@ -158,9 +158,15 @@ check_running() {
CHECK_STR="<title>Google Refine</title>" CHECK_STR="<title>Google Refine</title>"
if [ "$CURL" ] ; then if [ "$CURL" ] ; then
NOT_RUNNING=`curl -s -S $URL 2>&1 > /dev/null | grep "couldn't connect to host"` curl -s -S $URL > /dev/null 2>&1
if [ "$?" = "7" ] ; then
NOT_RUNNING="1"
fi
elif [ "$WGET" ] ; then elif [ "$WGET" ] ; then
NOT_RUNNING=`wget -O - $URL 2>&1 > /dev/null | grep "Connection refused"` wget -O - $URL > /dev/null 2>&1
if [ "$?" = "4" ] ; then
NOT_RUNNING="1"
fi
fi fi
if [ -z "${NOT_RUNNING}" ] ; then if [ -z "${NOT_RUNNING}" ] ; then
@ -171,7 +177,7 @@ check_running() {
fi fi
if [ -z "${RUNNING}" ] ; then if [ -z "${RUNNING}" ] ; then
error "Something is already running on $URL but doesn't seem to be Google Refine" error "Something is already running on $URL but doesn't seem to be Google Refine. Maybe a proxy issue?"
fi fi
else else
RUNNING="" RUNNING=""
@ -807,6 +813,7 @@ case "$SYSTEM" in
CYGWIN*) OS="windows" ;; CYGWIN*) OS="windows" ;;
Darwin*) OS="macosx" ;; Darwin*) OS="macosx" ;;
Linux*) OS="linux" ;; Linux*) OS="linux" ;;
*) OS="other" ;;
esac esac
SEP=":" SEP=":"