summaryrefslogtreecommitdiff
path: root/export.sh
diff options
context:
space:
mode:
Diffstat (limited to 'export.sh')
-rwxr-xr-xexport.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/export.sh b/export.sh
index 80499ca..085ea64 100755
--- a/export.sh
+++ b/export.sh
@@ -1,5 +1,10 @@
#!/usr/bin/env bash
-emacs index.org --batch -f org-html-export-to-html --kill
-tail -n +4 index.html | tee index.php
-rm index.html
+shopt -s nullglob
+for i in *.org; do
+ name="${i%%.*}"
+ echo $name
+ emacs "$i" --batch -f org-html-export-to-html --kill
+ tail -n +4 "$name.html" | tee "$name.php"
+ rm "$name.html" "$name.html~"
+done