Fix inappropriate regexp
This regexp replaces not only SNAPPER_CONFIG but also SNAPPER_CONFIG_DIR to SNAPPER_CONFIG. > 's@^SNAPPER_CONFIG.*@SNAPPER_CONFIG='$d'@g' I change this regexp to fix SNAPPER_CONFIG_DIR will become not undefined.
This commit is contained in:
2
Makefile
2
Makefile
@@ -26,6 +26,6 @@ SYSTEMD_DIR = $(DESTDIR)$(PREFIX)/lib/systemd/system
|
||||
.PHONY: install
|
||||
|
||||
install:
|
||||
@./find_snapper_config || sed -i 's@^SNAPPER_CONFIG.*@SNAPPER_CONFIG='$(SNAPPER_CONFIG)'@g' bin/$(PKGNAME)
|
||||
@./find_snapper_config || sed -i 's@^SNAPPER_CONFIG=.*@SNAPPER_CONFIG='$(SNAPPER_CONFIG)'@g' bin/$(PKGNAME)
|
||||
@install -Dm755 bin/* -t $(BIN_DIR)/
|
||||
@install -Dm644 ./$(SNAPPER_TEMPLATES)/* -t $(DESTDIR)/$(SNAPPER_TEMPLATES)/
|
||||
|
||||
@@ -5,7 +5,7 @@ etcdirs="sysconfig default conf.d"
|
||||
for x in $etcdirs; do
|
||||
d=/etc/$x/snapper
|
||||
if [[ -f $d ]]; then
|
||||
sed -i 's@^SNAPPER_CONFIG.*@SNAPPER_CONFIG='$d'@g' bin/snap-sync
|
||||
sed -i 's@^SNAPPER_CONFIG=.*@SNAPPER_CONFIG='$d'@g' bin/snap-sync
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user