diff --git a/mackup/mackup.py b/mackup/mackup.py index f0d5c1040..5f2cc3299 100644 --- a/mackup/mackup.py +++ b/mackup/mackup.py @@ -19,9 +19,9 @@ class Mackup(object): """Main Mackup class.""" - def __init__(self): + def __init__(self, filename=None): """Mackup Constructor.""" - self._config = config.Config() + self._config = config.Config(filename) self.mackup_folder = self._config.fullpath self.temp_folder = tempfile.mkdtemp(prefix="mackup_tmp_") diff --git a/mackup/main.py b/mackup/main.py index c5e2b57e1..c564ecb9b 100644 --- a/mackup/main.py +++ b/mackup/main.py @@ -12,11 +12,12 @@ mackup --version Options: - -h --help Show this screen. - -f --force Force every question asked to be answered with "Yes". - -n --dry-run Show steps without executing. - -v --verbose Show additional details. - --version Show version. + -h --help Show this screen. + -c FILE --config=FILE Configuration file to use. + -f --force Force every question asked to be answered with "Yes". + -n --dry-run Show steps without executing. + -v --verbose Show additional details. + --version Show version. Modes of action: 1. list: display a list of all supported applications. @@ -61,7 +62,7 @@ def main(): # Get the command line arg args = docopt(__doc__, version="Mackup {}".format(VERSION)) - mckp = Mackup() + mckp = Mackup(args['--config']) app_db = ApplicationsDatabase() def printAppHeader(app_name):