diff options
author | mia <mia@mia.jetzt> | 2024-07-30 12:54:29 -0700 |
---|---|---|
committer | mia <mia@mia.jetzt> | 2024-07-30 12:54:29 -0700 |
commit | 1d3ae7d37838be13b7c5dc28f0657577eeaff759 (patch) | |
tree | 46395ab1ef1b6fb818d8b17c200450dc6da14c5a | |
parent | 23dd080d18ab2bbb528f056bb083672c359e04e9 (diff) | |
download | zoner-1d3ae7d37838be13b7c5dc28f0657577eeaff759.tar.gz zoner-1d3ae7d37838be13b7c5dc28f0657577eeaff759.zip |
git pull before edit
-rw-r--r-- | zoner.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/zoner.py b/zoner.py index 0056396..f4d4b1c 100644 --- a/zoner.py +++ b/zoner.py @@ -198,6 +198,8 @@ def git_update(domain: str): def main(): + if (cfg_dir / ".git").exists(): + subprocess.check_call(["git", "pull"], cwd=cfg_dir, stdout=subprocess.PIPE) if len(sys.argv) == 1: # selector names = map(lambda path: path.name[:-5], cfg_dir.glob("*.zone")) ret = subprocess.run( |