fixed cleanup problem

This commit is contained in:
bdc 1996-11-01 23:34:47 +00:00
parent 98af814b97
commit 5d8c6318a2
1 changed files with 15 additions and 6 deletions

View File

@ -190,11 +190,17 @@ For testing load this at a scsh prompt
;;; if directory exists blow it away
;;; useful for repeated runs from within same scsh process
(if (file-exists? (options:temp-dir options))
(if (file-directory? (options:temp-dir otions))
(with-cwd (options:temp-dir options)
(map delete-file (directory-files
(options:temp-dir options) #t)))
(delete-file (options:temp-dir options))))
(cond ((file-directory? (options:temp-dir otions))
(with-cwd (options:temp-dir options)
(let loop ((files (directory-files
(options:temp-dir options)
#t)))
(cond ((not (null? files))
(delete-file (car files))
(loop (cdr files))))))
(delete-directory (options:temp-dir options)))
(else
(delete-file (options:temp-dir options)))))
(create-directory (options:temp-dir options) #o755 #t)
;;; Process the info we gather to make it the output file
@ -203,8 +209,11 @@ For testing load this at a scsh prompt
(compile-main-c-file start reloc options)
(compile-c-image pure impure reloc externs options)
(link-files options)
(map delete-file (directory-files
(let loop ((files (directory-files
(options:temp-dir options) #t)))
(cond ((not (null? files))
(delete-file (car files))
(loop (cdr files))))))
(delete-directory (options:temp-dir options)))))
;;; read-heap-image