Skip to content

mbrunnen/fetcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fetcher

Updates your git-repositories by running git commands, that you specify for each of your repositories.

Install

Arch Linux

For Arch Linux simply use yaourt:

yaourt -S fetcher

Done!

Other Distributions

Clone this repo and copy the fetcher.sh to a location which is in your $PATH environment variable, e.g ~/.local/bin:

cp ./fetcher.sh ~/.local/bin/fetcher

That's it, but if you want to use the systemd service you need to install the unit file fetcher.service and timer fetcher.timer to a systemd unit path, e.g. ~/.config/systemd/user:

cp ./fetcher.service ~/.config/systemd/user/fetcher.service
cp ./fetcher.timer ~/.config/systemd/user/fetcher.timer

Configuration

In order to make this working, you need a configuration file, which is by default at ~/.config/fetcher.conf. Each line consists of the repository and the action to be performed in that repository:

$HOME/workspace/repo pull --ff-only
~/workspace/repo2 pull origin master:master
~/workspace/repo2 push

Usage

Manually

In order to perform the actions, just run

fetcher

Automatically with systemd

The installed systemd service file will run fetcher automatically, after the network is online. To enable this just run following commands:

systemctl --user reload-daemon
systemctl --user enable fetcher.service fetcher.timer

To try it out you can run:

systemctl --user start fetcher.service fetcher.timer
systemctl --user status fetcher.service fetcher.timer

About

Keep your git repos updated!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages