Change snapper configuration location via Makefile
Update installation instructions. Fixes #43.
This commit is contained in:
2
Makefile
2
Makefile
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
PKGNAME = snap-sync
|
PKGNAME = snap-sync
|
||||||
PREFIX ?= /usr
|
PREFIX ?= /usr
|
||||||
|
SNAPPER_CONFIG ?= /etc/sysconfig/snapper
|
||||||
|
|
||||||
BIN_DIR = $(DESTDIR)$(PREFIX)/bin
|
BIN_DIR = $(DESTDIR)$(PREFIX)/bin
|
||||||
SYSTEMD_DIR = $(DESTDIR)$(PREFIX)/lib/systemd/system
|
SYSTEMD_DIR = $(DESTDIR)$(PREFIX)/lib/systemd/system
|
||||||
@@ -24,5 +25,6 @@ SYSTEMD_DIR = $(DESTDIR)$(PREFIX)/lib/systemd/system
|
|||||||
.PHONY: install
|
.PHONY: install
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
sed -i 's@^SNAPPER_CONFIG.*@SNAPPER_CONFIG='$(SNAPPER_CONFIG)'@g' bin/$(PKGNAME)
|
||||||
@install -Dm755 bin/* -t $(BIN_DIR)/
|
@install -Dm755 bin/* -t $(BIN_DIR)/
|
||||||
@install -Dm644 systemd/* -t $(SYSTEMD_DIR)/
|
@install -Dm644 systemd/* -t $(SYSTEMD_DIR)/
|
||||||
|
|||||||
19
README.md
19
README.md
@@ -20,6 +20,25 @@ have to be sent.
|
|||||||
|
|
||||||
snapper is required.
|
snapper is required.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Run:
|
||||||
|
|
||||||
|
# make install
|
||||||
|
|
||||||
|
By default it will look for the snapper configuration file at
|
||||||
|
`/etc/sysconfig/snapper`. To change this pass `SNAPPER_CONFIG` to make
|
||||||
|
with the location of the configuration file. For example, with Ubuntu
|
||||||
|
you will want to install:
|
||||||
|
|
||||||
|
# make SNAPPER_CONFIG=/etc/default/snapper install
|
||||||
|
|
||||||
|
For Arch Linux it would be:
|
||||||
|
|
||||||
|
# make SNAPPER_CONFIG=/etc/conf.d/snapper install
|
||||||
|
|
||||||
|
The package is available in the [AUR](https://aur.archlinux.org/packages/snap-sync/).
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
|
|
||||||
Usage: snap-sync [options]
|
Usage: snap-sync [options]
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ set -o errtrace
|
|||||||
version="0.4"
|
version="0.4"
|
||||||
name="snap-sync"
|
name="snap-sync"
|
||||||
|
|
||||||
|
SNAPPER_CONFIG=/etc/sysconfig/snapper
|
||||||
|
|
||||||
TMPDIR=$(mktemp -d)
|
TMPDIR=$(mktemp -d)
|
||||||
PIPE=$TMPDIR/$name.out
|
PIPE=$TMPDIR/$name.out
|
||||||
mkfifo $PIPE
|
mkfifo $PIPE
|
||||||
|
|||||||
Reference in New Issue
Block a user