Commits

Michael Granger committed 05317bf

Try to make examples more tolerant of being run from other directories

Comments (0)

Files changed (2)

examples/config.rb

 upload_dir = Pathname( Dir.tmpdir )
 
 # samples server
-server 'examples' do
+s = server 'examples' do
 
 	name         'Examples'
 	default_host 'localhost'
 mkdir_p 'logs'
 mkdir_p '/tmp/mongrel2-uploads'
 
+puts "Will chroot to: #{s.chroot}"
 puts "Upload dir is: #{upload_dir}"
+
 
 echo "Creating/updating the config database..."
 ruby -rubygems -I${examplesdir}/../lib $examplesdir/../bin/m2sh.rb \
-	-c examples.sqlite load $examplesdir/config.rb
+	-c ${examplesdir}/examples.sqlite load $examplesdir/config.rb
 
 if [ $? != 0 ]; then
 	echo "Oops, problems installing the config DB. Aborting."