From a00326e28afc818cf5a4c124182c0626b96d51aa Mon Sep 17 00:00:00 2001 From: Toshifumi NISHINAGA Date: Fri, 30 Mar 2018 03:45:45 +0900 Subject: [PATCH] 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. --- Makefile | 2 +- find_snapper_config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 51d58fa..bfe9813 100644 --- a/Makefile +++ b/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)/ diff --git a/find_snapper_config b/find_snapper_config index a04fae3..ee78db7 100755 --- a/find_snapper_config +++ b/find_snapper_config @@ -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