diff --git a/README.md b/README.md index 8e3e0c4..ba55950 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,9 @@ For MacOS users, make sure to install `realpath` through homebrew Using dotdrop as a submodule will need you to work with dotdrop by using the generated script `dotdrop.sh` at the root -of your dotfiles repository. +of your dotfiles repository. Note that this script updates the submodule +automatically, unless called with the environment variable `DOTDROP_AUTOUPDATE` +set to `no`. To ease the use of dotdrop, it is recommended to add an alias to it in your shell (*~/.bashrc*, *~/.zshrc*, etc) with the config file path, for example diff --git a/dotdrop.sh b/dotdrop.sh index a469f7f..8c458a5 100755 --- a/dotdrop.sh +++ b/dotdrop.sh @@ -24,8 +24,10 @@ sub="dotdrop" # pivot cd "${cur}" || { echo "Directory \"${cur}\" doesn't exist, aborting." && exit 1; } # init/update the submodule -git submodule update --init --recursive -git submodule update --remote dotdrop +if [ "${DOTDROP_AUTOUPDATE-yes}" = yes ] ; then + git submodule update --init --recursive + git submodule update --remote dotdrop +fi # launch dotdrop PYTHONPATH=dotdrop python3 -m dotdrop.dotdrop "${args[@]}" ret="$?"