summaryrefslogtreecommitdiff
path: root/tools/restore.cpp
diff options
context:
space:
mode:
authorMike Dirolf <mike@10gen.com>2009-09-24 12:04:51 -0400
committerMike Dirolf <mike@10gen.com>2009-09-24 12:05:32 -0400
commita4d00f78d36c28dca300e8cf11bedd776d22db24 (patch)
treec2b461e0faef98933a84f982dd00280efa2042de /tools/restore.cpp
parentee9b2ea7eafa63fa36327520e35aeffc24828ff5 (diff)
downloadmongo-a4d00f78d36c28dca300e8cf11bedd776d22db24.tar.gz
make restore directory a positional argument
Diffstat (limited to 'tools/restore.cpp')
-rw-r--r--tools/restore.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/restore.cpp b/tools/restore.cpp
index 4001e65da94..ddb075ea890 100644
--- a/tools/restore.cpp
+++ b/tools/restore.cpp
@@ -32,9 +32,14 @@ namespace po = boost::program_options;
class Restore : public Tool {
public:
Restore() : Tool( "restore" , "" ){
- add_options()
+ add_hidden_options()
("dir", po::value<string>()->default_value("dump"), "directory to restore from")
;
+ addPositionArg("dir", 1);
+ }
+
+ virtual void printExtraHelp(ostream& out) {
+ out << "usage: " << _name << " [options] [directory or filename to restore from]" << endl;
}
int run(){