1
0
mirror of https://github.com/djohnlewis/stackdump synced 2024-12-04 23:17:37 +00:00

Added quotes in a bunch of places so things work with paths containing spaces.

This commit is contained in:
Sam 2013-10-14 07:31:50 +11:00
parent 3615a72310
commit 9cac41929b
3 changed files with 10 additions and 10 deletions

View File

@ -31,21 +31,21 @@ PYTHON_CMD=python
# if there is a PYTHON_CMD file in the script directory, use that instead
if [ -e "$SCRIPT_DIR/PYTHON_CMD" ]
then
PYTHON_CMD=`cat $SCRIPT_DIR/PYTHON_CMD`
PYTHON_CMD=`cat "$SCRIPT_DIR/PYTHON_CMD"`
fi
if [ ! -z "`which $PYTHON_CMD 2>/dev/null`" ]
if [ ! -z "`which "$PYTHON_CMD" 2>/dev/null`" ]
then
# check if Python is the right version
PYTHON_VER=`$PYTHON_CMD -V 2>&1 | cut -d " " -f 2`
PYTHON_VER=`"$PYTHON_CMD" -V 2>&1 | cut -d " " -f 2`
checkPythonVersion "$PYTHON_VER"
if [ $? == 1 ]
then
echo "Using Python `which $PYTHON_CMD`"
echo "Using Python `which "$PYTHON_CMD"`"
# execution ends here if Python is found
PYTHONPATH=$SCRIPT_DIR/python/packages:$SCRIPT_DIR/python/src:$PYTHONPATH
env PYTHONPATH=$PYTHONPATH $PYTHON_CMD "$@"
env "PYTHONPATH=$PYTHONPATH" "$PYTHON_CMD" "$@"
exit $?
fi
fi

View File

@ -5,10 +5,10 @@ SCRIPT_DIR=`dirname $0`
JAVA_CMD=java
if [ -e "$SCRIPT_DIR/JAVA_CMD" ]
then
JAVA_CMD=`cat $SCRIPT_DIR/JAVA_CMD`
JAVA_CMD=`cat "$SCRIPT_DIR/JAVA_CMD"`
fi
if [ -z "`which $JAVA_CMD 2>/dev/null`" ]
if [ -z "`which "$JAVA_CMD" 2>/dev/null`" ]
then
echo "Java not found. Try specifying the path to the Java executable in a file named"
echo "JAVA_CMD in this script's directory."
@ -21,5 +21,5 @@ then
mkdir "$SCRIPT_DIR/data"
fi
cd $SCRIPT_DIR/java/solr/server
$JAVA_CMD -Xmx2048M -XX:MaxPermSize=512M -jar start.jar
cd "$SCRIPT_DIR/java/solr/server"
"$JAVA_CMD" -Xmx2048M -XX:MaxPermSize=512M -jar start.jar

View File

@ -8,4 +8,4 @@ then
mkdir "$SCRIPT_DIR/data"
fi
$SCRIPT_DIR/start_python.sh $SCRIPT_DIR/python/src/stackdump/app.py
"$SCRIPT_DIR/start_python.sh" "$SCRIPT_DIR/python/src/stackdump/app.py"