I may end up going this direction, at the moment I am not having much luck with the conditional copy in Busybox. Your suggestion:

cp -n newdatabase.db /data/newdatabase.db

Isn't supported in the version of Busybox that I am running. Also the script example I tried:

if  [ -f /data/newdatabase.db];
then
echo "Nothing to do, database exists"
else
cp newdatabase.db /data/newdatabase.db
fi

delivers the error  [:missing]

So I'll have to work through the scripting. Sure would be nice to have something like "sqlite3 newdatabase.db .exit" work so that it would just create the DB and exit

Pete Helgren
Value Added Software, Inc
www.asaap.com
www.opensource4i.com


On 8/30/2011 8:14 PM, Simon Slavin wrote:
Forgot to mention: copying an existing database file also lets you set up the 
file the way you want without having to issue separate commands.  For instance, 
you could create blank tables.  Or set a specific page size.  Or include some 
sort of DRM or security check in the 'blank' file.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to