]> git.eshelyaron.com Git - emacs.git/commitdiff
* admin/emacs-shell-lib: Backport to Bash 4.4 or older.
authorStefan Kangas <stefankangas@gmail.com>
Thu, 20 Jun 2024 21:12:31 +0000 (23:12 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 22 Jun 2024 15:38:23 +0000 (17:38 +0200)
(cherry picked from commit f3e80dd0f70aabb6abcddb0148f75356fb60c32b)

admin/emacs-shell-lib

index 1c4d895fdb4c365d62556c289348e7aeb0ddd2af..e639a4740a19e31fb9e20f2a8cfd2f3034091c91 100644 (file)
@@ -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