From 142915438d5cc467ac5d512df67283797ff191e7 Mon Sep 17 00:00:00 2001 From: Albert Chu Date: Mon, 16 Nov 2015 16:49:58 -0800 Subject: [PATCH] Move definition of WORK_DIR earlier in the script so that it is available for output in the help output. --- examples/bin/cluster-reuters.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/bin/cluster-reuters.sh b/examples/bin/cluster-reuters.sh index 1c1a17d8b0..d53aa00d2a 100755 --- a/examples/bin/cluster-reuters.sh +++ b/examples/bin/cluster-reuters.sh @@ -43,6 +43,8 @@ if [ ! -e $MAHOUT ]; then exit 1 fi +WORK_DIR=/tmp/mahout-work-${USER} + algorithm=( kmeans fuzzykmeans lda streamingkmeans clean) if [ -n "$1" ]; then choice=$1 @@ -59,8 +61,6 @@ fi echo "ok. You chose $choice and we'll use ${algorithm[$choice-1]} Clustering" clustertype=${algorithm[$choice-1]} -WORK_DIR=/tmp/mahout-work-${USER} - if [ "x$clustertype" == "xclean" ]; then rm -rf $WORK_DIR $DFSRM $WORK_DIR