From d42f8c59a1cf6a260d879824b8b48cdcd921728d Mon Sep 17 00:00:00 2001 From: Edward Date: Wed, 15 Jul 2026 10:57:32 -0500 Subject: [PATCH 1/1] Fix for gather command --- bin/mg | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/bin/mg b/bin/mg index e803fe6..c78f32a 100755 --- a/bin/mg +++ b/bin/mg @@ -28,7 +28,7 @@ fi if [ -n "$more_files" ]; then echo "Will merge $more_files into $fname" else - echo "Nothing to gather for $2" + echo "No second keyword." fi echo "" @@ -39,13 +39,21 @@ if [[ ! $input == "Y" && ! $input == "y" ]]; then exit 1 fi -echo "Huzzah!" -cat $files >> $fname.gathered +for f in $files; do + echo "Gathering $f into $fname" + cat "$f" >> "$fname.gathered" +done + mkdir -p $archive mv $files $archive if [ -n "$more_files" ]; then - cat $more_files >> $fname.gathered + + for f in $more_files; do + echo "Gathering $f into $fname" + cat "$f" >> "$fname.gathered" + done + mv $more_files $archive fi -- 2.47.3