mirror of
https://github.com/getpaseo/paseo.git
synced 2026-08-14 12:23:16 +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"
|
sanitize_room_path "$room"
|
||||||
require_room "$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=""
|
since_file=""
|
||||||
if [[ -n "$since" ]]; then
|
if [[ -n "$since" ]]; then
|
||||||
@@ -587,7 +590,10 @@ case "$command_name" in
|
|||||||
trap 'exit 130' INT TERM
|
trap 'exit 130' INT TERM
|
||||||
|
|
||||||
while true; do
|
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=()
|
new_files=()
|
||||||
after_baseline=false
|
after_baseline=false
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user