From f3e80dd0f70aabb6abcddb0148f75356fb60c32b Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 20 Jun 2024 23:12:31 +0200 Subject: [PATCH] * admin/emacs-shell-lib: Backport to Bash 4.4 or older. --- admin/emacs-shell-lib | 3 +++ 1 file changed, 3 insertions(+) diff --git a/admin/emacs-shell-lib b/admin/emacs-shell-lib index 1c4d895fdb4..e639a4740a1 100644 --- a/admin/emacs-shell-lib +++ b/admin/emacs-shell-lib @@ -49,6 +49,9 @@ emacs_tempfiles=() emacs_tempfiles_cleanup () { + # This is needed on Bash 4.4 or older. + [ ${#emacs_tempfiles[@]} -eq 0 ] && return + for file in ${emacs_tempfiles[@]}; do rm -f "${file}" 2> /dev/null done