add-quip 197 B

1234567891011
  1. #!/bin/bash -e
  2. UUID=$(uuidgen)
  3. TGT="quips/${UUID}"
  4. printf "content: |\n ...\nid: $UUID\n" >$TGT
  5. if ! $EDITOR $TGT; then
  6. rm $TGT
  7. fi
  8. rm -f "${TGT}~"
  9. git add $TGT
  10. git commit -m "added new quip"