From 70ce7c200bdcbe1f00ffcf6dedf3eff7857525b5 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sun, 21 Jun 2020 22:06:31 +0300 Subject: [PATCH] Add Makefile for zipping reciepts to send to my accountant. --- Documents/Shore/taxes/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Documents/Shore/taxes/Makefile diff --git a/Documents/Shore/taxes/Makefile b/Documents/Shore/taxes/Makefile new file mode 100644 index 0000000..afc3a7c --- /dev/null +++ b/Documents/Shore/taxes/Makefile @@ -0,0 +1,10 @@ +last_month != date +%Y-%m --date 'last month' +last_zip != ls *.zip | sort -r | head -1 +new_files != find reciepts/ -type f -newer ${last_zip} + +${last_month}.zip: ${new_files} + zip $@ $^ + +.PHONY: clean +clean: + rm *.zip -- GitLab