mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Replace mapfile with portable while-read loop in chat script
mapfile is a bash 4+ builtin and fails on macOS default bash 3.2 with "command not found".
This commit is contained in:
@@ -495,7 +495,10 @@ case "$command_name" in
|
||||
sanitize_room_path "$room"
|
||||
require_room "$room"
|
||||
|
||||
mapfile -t all_files < <(message_files_sorted "$room")
|
||||
all_files=()
|
||||
while IFS= read -r _f; do
|
||||
all_files+=("$_f")
|
||||
done < <(message_files_sorted "$room")
|
||||
|
||||
since_file=""
|
||||
if [[ -n "$since" ]]; then
|
||||
@@ -587,7 +590,10 @@ case "$command_name" in
|
||||
trap 'exit 130' INT TERM
|
||||
|
||||
while true; do
|
||||
mapfile -t all_files < <(message_files_sorted "$room")
|
||||
all_files=()
|
||||
while IFS= read -r _f; do
|
||||
all_files+=("$_f")
|
||||
done < <(message_files_sorted "$room")
|
||||
new_files=()
|
||||
after_baseline=false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user