From: Stefan Kangas Date: Thu, 20 Jun 2024 21:12:31 +0000 (+0200) Subject: * admin/emacs-shell-lib: Backport to Bash 4.4 or older. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5fac2126ee1a926af6fa6632133943b01906e5fe;p=emacs.git * admin/emacs-shell-lib: Backport to Bash 4.4 or older. (cherry picked from commit f3e80dd0f70aabb6abcddb0148f75356fb60c32b) --- 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