diff --git a/README.md b/README.md index dbc002c..6c57f2d 100644 --- a/README.md +++ b/README.md @@ -192,7 +192,11 @@ For more options see `dotdrop --help`. For easy deployment the default profile used by dotdrop reflects the hostname of the host on which it runs. It can be changed either with the -`--profile` switch or by defining the `DOTDROP_PROFILE` environment variable. +`-p --profile` switch or by defining the `DOTDROP_PROFILE` environment variable. + +The config file is per default `config.yaml` and can be changed either +using the `-c --cfg` cli switch or by defining the `DOTDROP_CONFIG` environment +variable. ## Install dotfiles diff --git a/dotdrop/options.py b/dotdrop/options.py index 58384d0..7e93aff 100644 --- a/dotdrop/options.py +++ b/dotdrop/options.py @@ -15,13 +15,18 @@ from dotdrop.linktypes import LinkTypes from dotdrop.logger import Logger from dotdrop.config import Cfg +ENV_PROFILE = 'DOTDROP_PROFILE' +ENV_CONFIG = 'DOTDROP_CONFIG' +ENV_NOBANNER = 'DOTDROP_NOBANNER' PROFILE = socket.gethostname() -ENV_PROFILE = 'DOTDROP_PROFILE' -ENV_NOBANNER = 'DOTDROP_NOBANNER' if ENV_PROFILE in os.environ: PROFILE = os.environ[ENV_PROFILE] +CONFIG = 'config.yaml' +if ENV_CONFIG in os.environ: + CONFIG = os.environ[ENV_CONFIG] + BANNER = """ _ _ _ __| | ___ | |_ __| |_ __ ___ _ __ / _` |/ _ \| __/ _` | '__/ _ \| '_ | @@ -46,7 +51,7 @@ Usage: Options: -p --profile= Specify the profile to use [default: {}]. - -c --cfg= Path to the config [default: config.yaml]. + -c --cfg= Path to the config [default: {}]. -C --file= Path of dotfile to compare. -i --ignore= Pattern to ignore. -o --dopts= Diff options [default: ]. @@ -64,7 +69,7 @@ Options: -v --version Show version. -h --help Show this screen. -""".format(BANNER, PROFILE) +""".format(BANNER, PROFILE, CONFIG) class AttrMonitor: