4a644427c73c797273ec42a51e4204cd473b2f8b
hiram
  Fri Aug 30 16:06:54 2013 -0700
correct testing for existence of downloaded source refs #9149
diff --git src/userApps/Makefile src/userApps/Makefile
index 373c1aa..11f32a5 100644
--- src/userApps/Makefile
+++ src/userApps/Makefile
@@ -34,31 +34,31 @@
 fetchSource:
 	./fetchKentSource.sh
 	@echo -n "size of fetched kent source tree: "
 	@du -hs kent
 	@echo -n "number of files in kent source tree: "
 	@find ./kent -type f | wc -l
 
 # this installEnvironment will add all the shell environment variables
 # to the kent/src/inc/localEnvironment.mk file which is included
 # from the kent/src/inc/userApps.mk to allow any 'make' to function
 # properly when inside this extracted source tree.  The 'sed' operation
 # removes the '-e' from the echo for systems where the echo command doesn't
 # recognize the '-e' argument
 
 installEnvironment:
-	@test -s kent/src/inc/localEnvironment.mk || echo "ERROR: source has not been fetched yet, try 'make fetchSource' first."; exit 255
+	@test -d kent/src/inc || (echo "ERROR: source has not been fetched yet, try 'make fetchSource' first."; exit 255)
 	@echo -e "export DESTDIR = ${DESTDIR}\n\
 export BINDIR = ${BINDIR}\n\
 export MACHTYPE = ${MACHTYPE}\n\
 export CGI_BIN = ${CGI_BIN}\n\
 export DOCUMENTROOT = ${DOCUMENTROOT}\n\
 export SCRIPTS = ${SCRIPTS}\n\
 export SAMTABIXDIR = ${SAMTABIXDIR}\n\
 export USE_SAMTABIX = 1\n\
 export USE_SSL = 1\n\
 export NOSQLTEST = 1" | sed -e 's/-e //' > kent/src/inc/localEnvironment.mk
 
 update: clean userApps
 	${MAKE} fetchSource
 	${MAKE} utils