cleanup for size

This commit is contained in:
Jay McCarthy 2014-05-07 15:41:32 -06:00
parent 8e991203bc
commit 7ce7f9c2f2
5 changed files with 40 additions and 20 deletions

View File

@ -27,7 +27,7 @@ run_loop () { # <basename> <kill?>
echo "$1: compiling"
"$PLTROOT/bin/raco" make "$1.rkt"
echo "$1: running"
"$R" -t "$1.rkt" 2>&1 >> "$LOGS/$1.log" &
"$R" -t "$1.rkt" &
echo "$!" > "$LOGS/$1.pid"
wait "$!"
echo "$1: died"
@ -39,7 +39,7 @@ run_loop () { # <basename> <kill?>
done
}
exec 2>&1 >> "$LOGS/meta.log"
exec
run_loop render &
run_loop main yes &

View File

@ -62,7 +62,7 @@
(path->string
(build-path (drdr-directory) "make-archive.rkt"))
"--"
"--many" (number->string 100))))))
"--many" (number->string 45))))))
(notify! "Last revision is r~a" cur-rev)
(handle-revision prev-rev cur-rev)

View File

@ -8,14 +8,16 @@
(define (make-archive rev)
(define archive-path (revision-archive rev))
(if (file-exists? archive-path)
(printf "r~a is already archived\n" rev)
(local [(define tmp-path (make-temporary-file))]
(printf "Archiving r~a\n" rev)
(safely-delete-directory (revision-trunk.tgz rev))
(safely-delete-directory (revision-trunk.tar.7z rev))
(create-archive tmp-path (revision-dir rev))
(rename-file-or-directory tmp-path archive-path)
(safely-delete-directory (revision-log-dir rev))
(safely-delete-directory (revision-analyze-dir rev)))))
(begin (printf "r~a is already archived\n" rev)
#t)
(begin (local [(define tmp-path (make-temporary-file))]
(printf "Archiving r~a\n" rev)
(safely-delete-directory (revision-trunk.tgz rev))
(safely-delete-directory (revision-trunk.tar.7z rev))
(create-archive tmp-path (revision-dir rev))
(rename-file-or-directory tmp-path archive-path)
(safely-delete-directory (revision-log-dir rev))
(safely-delete-directory (revision-analyze-dir rev)))
#f)))
(provide make-archive)

View File

@ -16,11 +16,11 @@
["--many" "Archive many revisions" (mode 'many)]
#:args (ns)
(local [(define n (string->number ns))]
(case (mode)
[(many)
(local [(define all-revisions
(sort revisions >=))]
(for ([rev (in-list (list-tail all-revisions n))])
(make-archive rev)))]
[(single)
(make-archive n)])))
(case (mode)
[(many)
(local [(define all-revisions
(sort revisions >=))]
(for/or ([rev (in-list (list-tail all-revisions n))])
(make-archive rev)))]
[(single)
(make-archive n)])))

View File

@ -0,0 +1,18 @@
#lang racket/base
(define (check f)
(with-handlers ([exn:fail? (λ (x) x)])
(with-input-from-file f
(λ ()
(for ([e (in-port)])
(void))))
#f))
(for ([f (in-directory)]
#:when (file-exists? f)
#:when (regexp-match #rx"timing$" f))
(define c (check f))
(printf "~a\n" f)
(when c
(printf "\t~a\n" c)
(exit 1)))