OSDN Git Service

Added missing backup script
authorAkihiro Ono <a-ono@users.sourceforge.jp>
Sun, 13 Mar 2011 09:49:15 +0000 (18:49 +0900)
committerAkihiro Ono <a-ono@users.sourceforge.jp>
Sun, 13 Mar 2011 09:49:15 +0000 (18:49 +0900)
script/backup [new file with mode: 0644]

diff --git a/script/backup b/script/backup
new file mode 100644 (file)
index 0000000..414cc64
--- /dev/null
@@ -0,0 +1,25 @@
+#!/usr/bin/env ruby
+
+require 'backup_restore'
+
+class Backup
+  extend BackupRestore
+
+  def self.usage
+    warn <<-EOT
+Usage: backup <target> [<destination>]
+
+By default, backup to RedmineLE/backup directory.
+
+Targets:
+  all
+  #{targets.join("\n  ")}
+    EOT
+  end
+end
+
+if ARGV.length < 1
+  Backup.usage
+else
+  Backup.backup ARGV
+end