summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2024-05-24 12:49:25 -0500
committerCase Duckworth2024-05-24 12:50:47 -0500
commitf3ac0bc0288dc7a0d09130d6fa5ec8a4fb7923ce (patch)
treed7a94b6db6daaf60a62ea776337ea8330dfdc1ad
downloadblogger-f3ac0bc0288dc7a0d09130d6fa5ec8a4fb7923ce.tar.gz
blogger-f3ac0bc0288dc7a0d09130d6fa5ec8a4fb7923ce.zip
First post
here it is, my first post using blogger (the git blogging system)
everything is in commit messages.
the files could be ... oh i don't know, whatever? hm
-rwxr-xr-xnew/post37
1 files changed, 37 insertions, 0 deletions
diff --git a/new/post b/new/post new file mode 100755 index 0000000..48e4549 --- /dev/null +++ b/new/post
@@ -0,0 +1,37 @@
1#!/bin/sh
2
3usage() {
4 cat >&2 <<EOF
5$0: make a new post
6Usage: $0 [OPTIONS...] [TITLE...]
7Options:
8 -h Show this help and exit
9 -n Don't edit the post
10 -F FILE
11 Instead of using TITLE as the post's title, use it as a filename to read
12 into the post.
13Parameters:
14 TITLE...
15 The title of the post (its first line)
16EOF
17}
18
19main() {
20 startoff='--message="$*"'
21 edit='--edit'
22 while getopts hF:n OPT
23 do
24 case "$OPT" in
25 (h) usage 0 ;;
26 (F) startoff='--file="$*"' ;;
27 (n) edit='--no-edit' ;;
28 (*) usage 1 ;;
29 esac
30 done
31 shift $((OPTIND - 1))
32
33 git add .
34 eval git commit --allow-empty --no-status $startoff $edit
35}
36
37main "$@"