diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-03-10 23:23:46 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-03-10 23:23:46 +0100 |
commit | 20cb9a7d13ed36593432509ac0215b21c54d6657 (patch) | |
tree | 6d1bf3452a6ff92533792fd8640f519942e9e6a5 /src | |
parent | 112600774798e53e2ffbab6e0bbbc6fe625bf88b (diff) | |
download | sciteco-20cb9a7d13ed36593432509ac0215b21c54d6657.tar.gz |
added --no-profile command line option
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index de27e5e..79cb78b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -76,6 +76,7 @@ namespace Flags { static gchar *eval_macro = NULL; static gchar *mung_file = NULL; +static gboolean mung_profile = TRUE; sig_atomic_t sigint_occurred = FALSE; @@ -128,6 +129,11 @@ process_options(int &argc, char **&argv) {"mung", 'm', 0, G_OPTION_ARG_FILENAME, &mung_file, "Mung file instead of " "$SCITECOCONFIG" G_DIR_SEPARATOR_S INI_FILE, "file"}, + {"no-profile", 0, G_OPTION_FLAG_REVERSE, + G_OPTION_ARG_NONE, &mung_profile, + "Do not mung " + "$SCITECOCONFIG" G_DIR_SEPARATOR_S INI_FILE + " even if it exists"}, {NULL} }; @@ -353,11 +359,12 @@ main(int argc, char **argv) exit(EXIT_SUCCESS); } - if (!mung_file) + if (!mung_file && mung_profile) mung_file = g_build_filename(g_getenv("SCITECOCONFIG"), INI_FILE, NIL); - if (g_file_test(mung_file, G_FILE_TEST_IS_REGULAR)) { + if (mung_file && + g_file_test(mung_file, G_FILE_TEST_IS_REGULAR)) { Execute::file(mung_file, false); /* FIXME: make quit immediate in batch/macro mode (non-UNDO)? */ |