5 Commits

Author SHA1 Message Date
Erik Westrup
9760cd05ec Truly support custom PREFIX= install
* Before, doing `$ PREFIX=/usr/local make install` would install files to`/usr/local/usr/local..` which is wrong
* With this PR, files will be installed to the expected location e.g. `/usr/local/etc/restic`
* `Makefile` almost completely rewritten
   * As e.g. `default.env` would source `_global.env`, `default.env` must be edited to find the right location of `_global.env` depending on what `$PREFIX` was set to.
   * see documented build stages in the `Makefile` itself.
   *  Made sure that the rules are correct so that only modifed files are installed, not all at once unnecessarily like before.
* A sub-goal was that the [PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=restic-systemd-automatic-backup#n20) for Arch should not need to do any custom install configuration, to keep everything easier to maintain. `$ make install` should work out of the box for Arch.
* Additionally added the `-b` flag to `install(1)` that makes a backup of existing `etc/restic/*` files before installing a newer version.

Fixes #49
2022-02-03 20:52:00 +01:00
Gerard Bosch
d8f25cdf88 Multiple profile configuration (#45)
Adds possibility to have multiple profiles with different backup paths, retention etc.

Co-authored-by: Matt Feifarek <matt.feifarek@gmail.com>
Co-authored-by: Erik Westrup <erik.westrup@gmail.com>
2022-02-01 10:09:36 +01:00
Erik Westrup
428f4be872 Fix installation of template files
The target that copies the *.template files (#15) had a '/' prefixed which
should not be there. The copy should be locally here. The real install
happens in the install-conf that respects $PREFIX

Fixes #40
2021-12-03 17:09:14 +01:00
Erik Westrup
3460e9accf Full path in .gitignore 2021-10-30 13:52:27 +02:00
Bill Kaguru Wanjohi
5f35a74bd1 use template files to improve security, reproducibility 2019-04-26 14:26:05 +00:00