Skip to content

Commit

Permalink
add neato git-sync@ units for syncing git repos
Browse files Browse the repository at this point in the history
  • Loading branch information
edrex committed Apr 8, 2019
1 parent 6f94097 commit 03fc38e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .config/systemd/user/git-sync@.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Git Sync Path: %I
[Path]
PathModified=%h/%I/.git/refs/heads


[Install]
WantedBy=multi-user.target

6 changes: 6 additions & 0 deletions .config/systemd/user/git-sync@.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Unit]
Description=Git Sync: %I
[Service]
Type=oneshot
WorkingDirectory=%h/%I
ExecStart=%h/bin/git-sync
4 changes: 4 additions & 0 deletions bin/git-sync
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

git pull --rebase \
&& git push

0 comments on commit 03fc38e

Please sign in to comment.