fixed cleanup problem
This commit is contained in:
parent
98af814b97
commit
5d8c6318a2
|
@ -190,11 +190,17 @@ For testing load this at a scsh prompt
|
||||||
;;; if directory exists blow it away
|
;;; if directory exists blow it away
|
||||||
;;; useful for repeated runs from within same scsh process
|
;;; useful for repeated runs from within same scsh process
|
||||||
(if (file-exists? (options:temp-dir options))
|
(if (file-exists? (options:temp-dir options))
|
||||||
(if (file-directory? (options:temp-dir otions))
|
(cond ((file-directory? (options:temp-dir otions))
|
||||||
(with-cwd (options:temp-dir options)
|
(with-cwd (options:temp-dir options)
|
||||||
(map delete-file (directory-files
|
(let loop ((files (directory-files
|
||||||
(options:temp-dir options) #t)))
|
(options:temp-dir options)
|
||||||
(delete-file (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)
|
(create-directory (options:temp-dir options) #o755 #t)
|
||||||
|
|
||||||
;;; Process the info we gather to make it the output file
|
;;; 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-main-c-file start reloc options)
|
||||||
(compile-c-image pure impure reloc externs options)
|
(compile-c-image pure impure reloc externs options)
|
||||||
(link-files options)
|
(link-files options)
|
||||||
(map delete-file (directory-files
|
(let loop ((files (directory-files
|
||||||
(options:temp-dir options) #t)))
|
(options:temp-dir options) #t)))
|
||||||
|
(cond ((not (null? files))
|
||||||
|
(delete-file (car files))
|
||||||
|
(loop (cdr files))))))
|
||||||
(delete-directory (options:temp-dir options)))))
|
(delete-directory (options:temp-dir options)))))
|
||||||
|
|
||||||
;;; read-heap-image
|
;;; read-heap-image
|
||||||
|
|
Loading…
Reference in New Issue