From: Edward Delaporte Date: Wed, 3 Jun 2026 22:40:39 +0000 (-0500) Subject: Update to bash X-Git-Url: https://us-delaporte.pagekite.me/gitweb/minion.git/commitdiff_plain/b0a99650ee7c8239d28805550e0ff503f65db624 Update to bash --- diff --git a/bin/mp b/bin/mp index 45291cb..823f3b4 100755 --- a/bin/mp +++ b/bin/mp @@ -1,14 +1,17 @@ -#!/usr/bin/fish -set year (date +%Y) -set files $(find $HOME/Journal/$year -type f -iname "*$argv*\.md") - -if test (count $files) -lt 5; - for file in $files - mdtohtml $file > $file.html - firefox $file.html - end; -else - echo "More than 5 files found." -end - +#!/usr/bin/bash +year=`date +%Y` +files=$(find $HOME/Journal/$year -type f -iname "*$1*\.md") +counter=0 +for file in $files; do + # echo $file + mdtohtml $file > $file.html + firefox $file.html + counter=$((counter + 1)) +if [ $counter -gt 4 ]; then + echo "Aborting after 4 files." + echo "The following files would have been processed..." + echo $files + exit 1 +fi +done