Add useless makefiles
This commit is contained in:
parent
eac8ccf339
commit
0d253c7da6
2 changed files with 32 additions and 0 deletions
15
2023/Makefile
Normal file
15
2023/Makefile
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
MKDIR = mkdir
|
||||||
|
|
||||||
|
LATEST_DAY := $(patsubst day%,%,$(lastword $(sort $(wildcard day[0-9]*))))
|
||||||
|
|
||||||
|
ifeq ($(LATEST_DAY),)
|
||||||
|
NEW_DAY := 1
|
||||||
|
else
|
||||||
|
NEW_DAY := $(shell echo $$(( $(LATEST_DAY) + 1 )) )
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
all: create_day
|
||||||
|
|
||||||
|
create_day:
|
||||||
|
$(MKDIR) "day$(NEW_DAY)"
|
17
Makefile
Normal file
17
Makefile
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
MKDIR = mkdir
|
||||||
|
CP = cp
|
||||||
|
|
||||||
|
LATEST_YEAR := $(lastword $(sort $(wildcard [0-9]*)))
|
||||||
|
|
||||||
|
ifeq ($(LATEST_YEAR),)
|
||||||
|
NEW_YEAR := $(shell date -u +%Y)
|
||||||
|
else
|
||||||
|
NEW_YEAR := $(shell echo $$(( $(LATEST_YEAR) + 1 )) )
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
all: create_year
|
||||||
|
|
||||||
|
create_year:
|
||||||
|
$(MKDIR) "$(NEW_YEAR)"
|
||||||
|
$(CP) "$(LATEST_YEAR)/Makefile" "$(NEW_YEAR)"
|
Loading…
Reference in a new issue