summaryrefslogtreecommitdiff
path: root/cpp/src/iceserviceinstall/Install.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2008-04-03 12:36:57 +1000
committerMichi Henning <michi@zeroc.com>2008-04-03 12:36:57 +1000
commit27a24cf07fa7646c5a27cbbfb60d6e4a86184ebc (patch)
tree4d825c1cb800b154ea4b33b238027f1ff9a13531 /cpp/src/iceserviceinstall/Install.cpp
parentFixed comment for GCShared (wrong namespace). (diff)
parentMerge branch 'master' of cvs:/home/git/ice (diff)
downloadice-27a24cf07fa7646c5a27cbbfb60d6e4a86184ebc.tar.bz2
ice-27a24cf07fa7646c5a27cbbfb60d6e4a86184ebc.tar.xz
ice-27a24cf07fa7646c5a27cbbfb60d6e4a86184ebc.zip
Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice
Diffstat (limited to 'cpp/src/iceserviceinstall/Install.cpp')
-rwxr-xr-xcpp/src/iceserviceinstall/Install.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/cpp/src/iceserviceinstall/Install.cpp b/cpp/src/iceserviceinstall/Install.cpp
index 124961b9e83..c1e11015280 100755
--- a/cpp/src/iceserviceinstall/Install.cpp
+++ b/cpp/src/iceserviceinstall/Install.cpp
@@ -23,6 +23,7 @@ public:
bool pauseEnabled() const;
bool debug() const;
+ bool pause() const;
private:
@@ -30,6 +31,7 @@ private:
bool _debug;
bool _pauseEnabled;
+ bool _pause;
};
int
@@ -38,7 +40,7 @@ main(int argc, char* argv[])
Install app;
int status = app.main(argc, argv);
- if(app.pauseEnabled() && (app.debug() || status != 0))
+ if(app.pauseEnabled() && (app.pause() || app.debug() || status != 0))
{
system("pause");
}
@@ -74,19 +76,21 @@ Install::run(int argc, char* argv[])
return EXIT_FAILURE;
}
+ _pauseEnabled = !opts.isSet("nopause");
+
if(opts.isSet("help"))
{
usage();
+ _pause = true;
return EXIT_SUCCESS;
}
if(opts.isSet("version"))
{
cout << ICE_STRING_VERSION << endl;
+ _pause = true;
return EXIT_SUCCESS;
}
- _pauseEnabled = !opts.isSet("nopause");
-
if(commands.size() != 2)
{
usage();
@@ -151,7 +155,8 @@ Install::run(int argc, char* argv[])
Install::Install() :
_pauseEnabled(true),
- _debug(false)
+ _debug(false),
+ _pause(false)
{
}
@@ -167,6 +172,12 @@ Install::debug() const
return _debug;
}
+bool
+Install::pause() const
+{
+ return _pause;
+}
+
void
Install::usage() const
{