]> us-delaporte.pagekite.me Git - minion.git/commitdiff
Fixup for mdtohtml
authorEdward Delaporte <edward@delaporte.us>
Wed, 3 Jun 2026 23:07:24 +0000 (18:07 -0500)
committerEdward Delaporte <edward@delaporte.us>
Wed, 3 Jun 2026 23:07:24 +0000 (18:07 -0500)
bin/mp

diff --git a/bin/mp b/bin/mp
index 823f3b4ea06b5d0f51d37de4369184af00a8fdd8..dd6d9b51db21be9ad174eac0303139866234cb63 100755 (executable)
--- a/bin/mp
+++ b/bin/mp
@@ -2,11 +2,16 @@
 year=`date +%Y`
 files=$(find $HOME/Journal/$year -type f -iname "*$1*\.md")
 
 year=`date +%Y`
 files=$(find $HOME/Journal/$year -type f -iname "*$1*\.md")
 
+if [ -z ${BROWSER} ]; then
+       echo "BROWSER unset, defaulting to Firefox"
+       export BROWSER=firefox
+fi
+
 counter=0
 for file in $files; do 
        # echo $file
 counter=0
 for file in $files; do 
        # echo $file
-       mdtohtml $file > $file.html
-       firefox $file.html
+       mdtohtml $file $file.html
+       $BROWSER $file.html
        counter=$((counter + 1))
 if [ $counter -gt 4 ]; then
                echo "Aborting after 4 files."
        counter=$((counter + 1))
 if [ $counter -gt 4 ]; then
                echo "Aborting after 4 files."