From 894b183de2715de2b7328852b406d5984f06adc6 Mon Sep 17 00:00:00 2001 From: Ain Date: Sat, 11 Nov 2017 23:06:49 +0000 Subject: [PATCH 1/3] Replace GNU-specific `date` invocation --- newpost.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newpost.sh b/newpost.sh index c20df0f..e77668f 100755 --- a/newpost.sh +++ b/newpost.sh @@ -1,6 +1,6 @@ #! /bin/bash -date=$(date --rfc-3339=date) +date=$(date +%Y-%m-%d) title= author= From 8364169c2786195aebcac090d6cf1eba25cdbac0 Mon Sep 17 00:00:00 2001 From: Ain Date: Sat, 11 Nov 2017 23:09:03 +0000 Subject: [PATCH 2/3] Fix for non-vim users --- newpost.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newpost.sh b/newpost.sh index e77668f..a535ed8 100755 --- a/newpost.sh +++ b/newpost.sh @@ -28,7 +28,7 @@ function main { done postname="./site/posts/$date-${title// /-}.md" echo -e "---\ntitle: ${title}\nauthor: ${author}\ndescription: \n---" >> $postname - vim $postname + ${VISUAL:-vim} $postname } main From 4fc3d9a7e4cdbb0c0d991479dfe68cae8eb73525 Mon Sep 17 00:00:00 2001 From: Ain Date: Sat, 11 Nov 2017 23:09:20 +0000 Subject: [PATCH 3/3] Fix shebang line --- newpost.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newpost.sh b/newpost.sh index a535ed8..be27b2c 100755 --- a/newpost.sh +++ b/newpost.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#!/bin/bash date=$(date +%Y-%m-%d) title=