These systemd unit and timer configurations will get an up-to-date copy of Swift and build the toolchain every day at 2:00 AM local time.
In order for these configurations to work without modification it is assumed that all of the development dependencies are already installed and that the Swift repository is cloned in $HOME/Source/swift-source/swift
.
$ mkdir -p $HOME/.config/systemd/user
$ cd $HOME/.config/systemd/user
$ wget https://gist.github.com/RLovelett/1890ed3b9e5524e57e7aa4a66408cac6/raw/update-and-build-swift-master.service
$ wget https://gist.github.com/RLovelett/1890ed3b9e5524e57e7aa4a66408cac6/raw/swift-daily-build.timer
$ systemctl --user daemon-reload
$ systemctl --user start swift-daily-build.timer
$ systemctl --user list-timers --all
$ systemctl --user disable swift-daily-build.timer
$ systemctl --user disable update-and-build-swift-master.service
$ systemctl --user reset-failed