aboutsummaryrefslogtreecommitdiff
path: root/new
diff options
context:
space:
mode:
authorNat Lasseter <user@4574.co.uk>2018-12-07 10:25:39 +0000
committerNat Lasseter <user@4574.co.uk>2018-12-07 10:25:39 +0000
commit0601ee07997c1fc76e912ec060bc7ae82ecfcae1 (patch)
tree7390fa5af277d15f8c0834da7dcceb841bdc0acd /new
parent08fd489704409e1d7414ff51bdac5d789cabb668 (diff)
[new] default to today if arg not given
Diffstat (limited to 'new')
-rwxr-xr-xnew6
1 files changed, 5 insertions, 1 deletions
diff --git a/new b/new
index 4710d71..8efe6c9 100755
--- a/new
+++ b/new
@@ -1,6 +1,10 @@
#!/bin/bash
-D=$1
+if [ "x$1" == "x" ]; then
+ D=$(date +%d)
+else
+ D=$1
+fi
cp -r skel day$D
sed -i "s/DAY = /DAY = ${D}/" day${D}/Makefile