diff options
author | Nat Lasseter <user@4574.co.uk> | 2018-12-07 10:25:39 +0000 |
---|---|---|
committer | Nat Lasseter <user@4574.co.uk> | 2018-12-07 10:25:39 +0000 |
commit | 0601ee07997c1fc76e912ec060bc7ae82ecfcae1 (patch) | |
tree | 7390fa5af277d15f8c0834da7dcceb841bdc0acd | |
parent | 08fd489704409e1d7414ff51bdac5d789cabb668 (diff) |
[new] default to today if arg not given
-rwxr-xr-x | new | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |