Paste number 325892: computed-dir

Paste number 325892: computed-dir
Pasted by: janneke
When:6 years, 1 week ago
Share:Tweet this! | http://paste.lisp.org/+6ZGK
Channel:None
Paste contents:
Raw Source | XML | Display As
(define (rottlog-etc config)
  (define (period->etc-pair period)
    ;;(list (car period) #~(cdr period))
    (list (car period) (cdr period)))
  (let ((periods (rottlog-periods config)
                 ;;;'()
         ))
    (pk "PERIODS:" '#$periods)
    `(
      ;;fine
      ("rc" ,(rottlog-rc-file config))
      ;;("/rottlog/rc" ,(rottlog-rc-file config))
      ;;("rottlog" `(("rc" ,,(rottlog-rc-file config))))

      ;;fine
      ,@(map period->etc-pair (rottlog-periods config))
      ;; /etc/rottlog: no freakin' way...: Unknown # object: #\<
      ("rottlog" ,(computed-file
                   "rottlog"
                   #~(begin
                       (mkdir #$output)
                       ;;(pk "PERIODS:" '#$periods)
                       (for-each
                        (lambda (period)
                          (let ((name (car period))
                                (file (cdr period)))
                            ;;(symlink file (string-append #$output "/" name))
                            #t
                            ))
                        ;;'#$periods
                        '#$(map identity periods)
                        )))))))

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.