update .env when older than .env.dist

This commit is contained in:
Yann Autissier
2023-11-25 23:20:04 +01:00
parent 2fb3c83b6a
commit 5e3782c944
4 changed files with 31 additions and 12 deletions
+6
View File
@@ -225,6 +225,12 @@ force = $$(while true; do \
# macro gid: Return GID of group 1
gid = $(shell awk -F':' '$$1 == "$(1)" {print $$3}' /etc/group 2>/dev/null)
# macro newer: Return the newest file
newer = $(shell stat -c '%Y %n' $(1) $(2) $(if $(DEBUG),,2>/dev/null) |sort -n |tail -n1 |awk '{print $$2}')
# older newer: Return the oldest file
older = $(shell stat -c '%Y %n' $(1) $(2) $(if $(DEBUG),,2>/dev/null) |sort -n |head -n1 |awk '{print $$2}')
# macro pop: Return last word of string 1 according to separator 2
pop = $(patsubst %$(or $(2),/)$(lastword $(subst $(or $(2),/), ,$(1))),%,$(1))