You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

makefile 474B

4 년 전
5 년 전
5 년 전
2 년 전
5 년 전
2 년 전
12345678910111213
  1. include .env
  2. export
  3. PYTHONPATH := .
  4. FILE := $(shell find . -path "./y????/p??.py" -type f | xargs ls -rt | tail -n 1)
  5. YEAR := $(shell echo ${FILE} | sed 's/[^0-9]/ /g' | cut -d' ' -f4)
  6. DAY := $(shell echo ${FILE} | sed 's/[^0-9]/ /g' | cut -d' ' -f6 | bc)
  7. URL := https://adventofcode.com/${YEAR}/day/${DAY}/input
  8. DATA := $(shell echo ${FILE} | sed s/.py/.dat/)
  9. main:
  10. @test -f ${DATA} || curl -s -b "session=${SESSION}" ${URL} > ${DATA}
  11. @cat $(DATA) | python3 -u $(FILE)