diff options
author | Nat Lasseter <user@4574.co.uk> | 2023-12-05 20:59:45 +0000 |
---|---|---|
committer | Nat Lasseter <user@4574.co.uk> | 2023-12-05 20:59:45 +0000 |
commit | 5a3291883da4cac74a244bf482726433ec4b7016 (patch) | |
tree | 27641896ff2d74dce298ff312d22c58549b47579 | |
parent | c8c5a65d89fea8f61f20c03f0acac56b3440247a (diff) |
mktoday
-rwxr-xr-x[-rw-r--r--] | mktoday (renamed from dayXX.java) | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1,3 +1,16 @@ +#!/bin/bash + +day=$(date +%d) + +[ -d day${day} ] && { + echo "Today already exists!" + exit 1 +} + +mkdir day${day} +touch day${day}/test +touch day${day}/input +sed -e "s/XX/${day}/g" > day${day}/day${day}.java <<EOJAVA import java.io.IOException; import java.io.RandomAccessFile; @@ -18,3 +31,4 @@ public class dayXX { return "WIP"; } } +EOJAVA |