🗝
about summary refs log tree commit diff
path: root/zoner.py
diff options
context:
space:
mode:
authormia <mia@mia.jetzt>2024-07-30 12:54:29 -0700
committermia <mia@mia.jetzt>2024-07-30 12:54:29 -0700
commit1d3ae7d37838be13b7c5dc28f0657577eeaff759 (patch)
tree46395ab1ef1b6fb818d8b17c200450dc6da14c5a /zoner.py
parent23dd080d18ab2bbb528f056bb083672c359e04e9 (diff)
downloadzoner-1d3ae7d37838be13b7c5dc28f0657577eeaff759.tar.gz
zoner-1d3ae7d37838be13b7c5dc28f0657577eeaff759.zip
git pull before edit
Diffstat (limited to 'zoner.py')
-rw-r--r--zoner.py2
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(