summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.local/bin/idea11
1 files changed, 5 insertions, 6 deletions
diff --git a/.local/bin/idea b/.local/bin/idea
index 7e12a56..0c212dd 100755
--- a/.local/bin/idea
+++ b/.local/bin/idea
@@ -14,13 +14,12 @@ html_fmt='\t\t\t\t<h3>'"${date}"'<\/h3>\
\t\t\t\t\t'"${thought}"'\
\t\t\t\t<\/p>\
'
-gmi_fmt='\
-\
-## '"${date}"'\
-\
-'"${thought}"
+case $(hostname -s) in
+ mother|po-rbo) sed="sed -i" ;;
+ fbsd-tp) sed="sed -i ''" ;;
+esac
-sed -i '' -e '/<!-- thoughts here -->$/{n;s/^/'"${html_fmt}"'/;}' \
+$sed -e '/<!-- thoughts here -->$/{n;s/^/'"${html_fmt}"'/;}' \
"$HOME"/dev/web/joe-www/thoughts.html
git -C "$HOME"/dev/web/joe-www add -u
git -C "$HOME"/dev/web/joe-www commit -m "Thought: ${date}"