You are here

function drush_redirect_generate_redirects in Redirect 8

Same name and namespace in other branches
  1. 7.2 redirect.drush.inc \drush_redirect_generate_redirects()
  2. 7 redirect.drush.inc \drush_redirect_generate_redirects()

Command callback. Generate a number of redirects.

File

./redirect.drush.inc, line 29
Drush integration for the redirect module.

Code

function drush_redirect_generate_redirects($count = NULL) {
  if (drush_generate_is_number($count) == FALSE) {
    return drush_set_error('DEVEL_GENERATE_INVALID_INPUT', t('Invalid number of redirects.'));
  }
  module_load_include('inc', 'redirect', 'redirect.generate');
  drush_generate_include_devel();
  redirect_run_unprogressive_batch('redirect_generate_redirects_batch_info', $count, drush_get_option('delete'));
}