inital commit

This commit is contained in:
jnave
2023-11-07 09:03:53 -06:00
commit 80f7a7e8e2
6 changed files with 2088 additions and 0 deletions

17
convert.sh Normal file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
# Get output file as argument or fall back to `dtos`.
of="$1"
[ -z "$1" ] && of='dtos'
# Extract the shebang from README.org and write it to new file.
grep ':shebang' README.org | cut -d \" -f2 > "$of"
# Extract all '#+begin/end_src' blocks from README.org and append them to file;
# Remove the last line of whitespace since emacs does that too.
awk '/^#\+begin_src/{flag=1;next}/^#\+end_src/{flag=0;print ""}flag' \
README.org | head -n -1 >> "$of"
# Make the new file executable
chmod +x "$of"