jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1527013 - in /jena/trunk: apache-jena/bin/tdbloader2worker jena-tdb/bin/tdbloader2worker
Date Fri, 27 Sep 2013 18:17:21 GMT
Author: andy
Date: Fri Sep 27 18:17:21 2013
New Revision: 1527013

URL: http://svn.apache.org/r1527013
Log:
tdbloader2 - check location is empty

Modified:
    jena/trunk/apache-jena/bin/tdbloader2worker
    jena/trunk/jena-tdb/bin/tdbloader2worker

Modified: jena/trunk/apache-jena/bin/tdbloader2worker
URL: http://svn.apache.org/viewvc/jena/trunk/apache-jena/bin/tdbloader2worker?rev=1527013&r1=1527012&r2=1527013&view=diff
==============================================================================
--- jena/trunk/apache-jena/bin/tdbloader2worker (original)
+++ jena/trunk/apache-jena/bin/tdbloader2worker Fri Sep 27 18:17:21 2013
@@ -41,7 +41,7 @@ then
     exit 1
 fi
 
-USAGE="Usage: $(basename $0) --loc location datafile ..."
+USAGE="Usage: tdbloader2 --loc location datafile ..."
 PKG=com.hp.hpl.jena.tdb.store.bulkloader2
 
 if [ "$#" -lt 2 ] ; then echo "$USAGE" 1>&2 ; exit 1 ; fi
@@ -58,6 +58,12 @@ else 
     if [ "$ARG1" = "$LOC" ] ; then echo $USAGE 1>&2 ; exit 1 ; fi
 fi
 
+if test -n "$(find "$LOC" -maxdepth 1 -type f -print -quit)"
+then 
+    echo "Not empty: $LOC"
+    exit 1
+fi
+
 if [ ! -e "$LOC" ] ; then mkdir "$LOC" ; fi
 if [ ! -d "$LOC" ] ; then echo "Not a directory: $LOC" ; exit 1 ; fi
 

Modified: jena/trunk/jena-tdb/bin/tdbloader2worker
URL: http://svn.apache.org/viewvc/jena/trunk/jena-tdb/bin/tdbloader2worker?rev=1527013&r1=1527012&r2=1527013&view=diff
==============================================================================
--- jena/trunk/jena-tdb/bin/tdbloader2worker (original)
+++ jena/trunk/jena-tdb/bin/tdbloader2worker Fri Sep 27 18:17:21 2013
@@ -58,6 +58,12 @@ else 
     if [ "$ARG1" = "$LOC" ] ; then echo $USAGE 1>&2 ; exit 1 ; fi
 fi
 
+if test -n "$(find "$LOC" -maxdepth 1 -type f -print -quit)"
+then 
+    echo "Not empty: $LOC"
+    exit 1
+fi
+
 if [ ! -e "$LOC" ] ; then mkdir "$LOC" ; fi
 if [ ! -d "$LOC" ] ; then echo "Not a directory: $LOC" ; exit 1 ; fi
 



Mime
View raw message