allow for optional 'COURSE_DIR' parameter for the import rake target so that we can import only a single course

This commit is contained in:
Chris Dodge
2013-01-14 22:51:56 -05:00
parent 1cb2a6724d
commit 39769ea997

View File

@@ -421,7 +421,9 @@ end
namespace :cms do
desc "Import course data within the given DATA_DIR variable"
task :import do
if ENV['DATA_DIR']
if ENV['DATA_DIR'] and ENV['COURSE_DIR']
sh(django_admin(:cms, :dev, :import, ENV['DATA_DIR'], ENV['COURSE_DIR']))
elsif ENV['DATA_DIR']
sh(django_admin(:cms, :dev, :import, ENV['DATA_DIR']))
else
raise "Please specify a DATA_DIR variable that point to your data directory.\n" +