create test file only if it doesn't exist
[cloudstore.git] / test-gearman.sh
index c71bf68..209ec30 100755 (executable)
@@ -2,7 +2,7 @@
 
 #echo 'dpavlin@gmail.com password 100M' | gearman -f create_user -n
 
-sudo -u u2001 sh -cx "ps ax > ~u2001/foo.txt"
+test -e ~u2001/foo.txt || sudo -u u2001 sh -cx "ps ax > ~u2001/foo.txt"
 sudo sh -cx "rm -vRf ~u2002/*"
 
 echo '~u2001/foo.txt#~u2002/dir with space/file with space' | gearman -f send_file -n