瀏覽代碼

add basic scripts

Getty Ritter 2 年之前
父節點
當前提交
c8b8b4d98c
共有 3 個文件被更改,包括 16 次插入1 次删除
  1. 0 1
      .gitignore
  2. 8 0
      bin/add-quip
  3. 8 0
      bin/add-quote

+ 0 - 1
.gitignore

@@ -1,3 +1,2 @@
 lib
-bin
 bazel-*

+ 8 - 0
bin/add-quip

@@ -0,0 +1,8 @@
+#!/bin/bash -e
+
+UUID=$(uuidgen)
+printf "content: |\n   ...\nid: $UUID\n" >quips/$UUID
+if [ ! $EDITOR quotes/$UUID ]; then
+   rm quips/$UUID
+fi
+rm -f "quips/${UUID}~"

+ 8 - 0
bin/add-quote

@@ -0,0 +1,8 @@
+#!/bin/bash -e
+
+UUID=$(uuidgen)
+printf "content: |\n   ...\nauthor: ...\nid: $UUID\n" >quotes/$UUID
+if [ ! $EDITOR quotes/$UUID ]; then
+   rm quotes/$UUID
+fi
+rm -f "quotes/${UUID}~"