Skip to content

Commit 974b3b2

Browse files
committed
Update Makefile to replace @Version@ with the current version [#52]
1 parent 2e5eaca commit 974b3b2

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎Makefile‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,13 @@ $(PREFIX_BIN) $(PREFIX_LIB)/systemd/system $(PREFIX_ETC)/baksnapper/example:
3030
.PHONY: install bin systemd etc
3131
install: bin systemd
3232

33+
__root_dir=$(dir $(abspath $(lastword $(MAKEFILE_LIST))))
34+
__version=$(shell $(__root_dir)build-aux/version)
3335
bin: | $(PREFIX_BIN)
34-
@install baksnapper.sh $|/baksnapper
35-
@install baksnapperd.sh $|/baksnapperd
36+
@sed 's/@VERSION@/${__version}/' baksnapper.sh > $|/baksnapper
37+
@chmod 744 $|/baksnapper
38+
@sed 's/@VERSION@/${__version}/' baksnapperd.sh > $|/baksnapperd
39+
@chmod 744 $|/baksnapperd
3640

3741
systemd: etc | $(PREFIX_LIB)/systemd/system
3842
@install --mode=644 systemd/baksnapper@.timer $|/

0 commit comments

Comments
 (0)