? .drush.php.swp
? .svn
? drushrc.php
? z
? commands/core/.core.drush.inc.swp
? commands/pm/.pm.drush.inc.swp
? commands/pm/handler
? includes/.environment.inc.swp
Index: commands/core/core.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/commands/core/core.drush.inc,v
retrieving revision 1.11
diff -u -r1.11 core.drush.inc
--- commands/core/core.drush.inc	14 Apr 2009 04:55:39 -0000	1.11
+++ commands/core/core.drush.inc	14 Apr 2009 05:16:47 -0000
@@ -29,6 +29,39 @@
   $items['cron'] = array(
     'description' => 'Run all cron hooks.',
   );
+
+  $items['variable set'] = array(
+    'description' => dt('Set a Drupal variable'),
+    'examples' => array(
+      'drush variable set site_offline true' => dt("Set the 'site_offline' variable to true."),
+    ),
+    'arguments' => array(
+      'name' => dt('The name of the variable.'),
+      'value' => dt('The value to set the variable to.')
+    )
+  );
+
+  $items['variable get'] = array(
+    'description' => dt('Set a Drupal variable'),
+    'examples' => array(
+      'drush variable get site_offline' => dt("Get the value of the 'site_offline' variable."),
+    ),
+    'arguments' => array(
+      'name' => dt('The name of the variable.'),
+      'default' => dt('The default value to return if it has not been set.')
+    )
+  );
+
+  $items['variable del'] = array(
+    'description' => dt('Delete a Drupal variable, reverting it to the default value.'),
+    'examples' => array(
+      'drush variable del site_offline' => dt("Delete the 'site_offline' variable."),
+    ),
+    'arguments' => array(
+      'name' => dt('The name of the variable.'),
+    )
+  );
+
   $items['status'] = array(
     'description' => 'Provides a birds-eye view of the current Drupal installation, if any.',
     'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
@@ -240,6 +273,30 @@
 }
 
 /**
+ * Command callback. Set a Drupal variable.
+ */
+function core_variable_set($name, $value = null) {
+  variable_set($name, $value);
+  drush_log(dt("Set !name variable to !value.", array("!name" => $name, "!value" => $value)), 'success');
+}
+
+/**
+ * Command callback. Get a Drupal variable.
+ */
+function core_variable_get($name, $default = null) {
+  $value = variable_get($name, $default);
+  drush_log(dt("The !name variable is set to !value.", array("!name" => $name, "!value" => $value)), 'success'); 
+}
+
+/**
+ * Command callback. Delete a Drupal variable.
+ */
+function core_variable_del($name) {
+  variable_del($name, $default);
+  drush_log(dt("The !name variable has been deleted.", array("!name" => $name, "!value" => $value, TRUE)), 'success'); 
+}
+
+/**
  * Command callback. Provides a birds-eye view of the current Drupal
  * installation.
  */
