]> git.donarmstrong.com Git - debian-ctte.git/commitdiff
Make the get_metting script take an optional parameter
authorMargarita Manterola <marga@debian.org>
Tue, 16 Oct 2018 20:04:17 +0000 (22:04 +0200)
committerMargarita Manterola <marga@debian.org>
Tue, 16 Oct 2018 20:04:17 +0000 (22:04 +0200)
meetings/get_meeting.sh

index 4b6ba2c594b1201b5bfb1c8687d31f36e8120070..a257e88647157b300a2855e16884a948061a85e0 100755 (executable)
@@ -1,8 +1,15 @@
 #!/bin/sh
 
-YEAR=$(date +%Y)
-YMD=$(date +%Y%m%d)
-YMD2=$(date +'%Y-%m-%d')
+origdate=$1
+if [ -z "$origdate" ]; then
+  origdate="now"
+fi
+
+YEAR=$(date +%Y "-d $origdate")
+YMD=$(date +%Y%m%d -d "$origdate")
+YMD2=$(date +'%Y-%m-%d' -d "$origdate")
+
+echo Obtaining meeting notes for $YMD2
 
 set -x
 mkdir -p ${YMD};