Changeset 36884 in project


Ignore:
Timestamp:
11/24/18 16:29:38 (2 weeks ago)
Author:
syn
Message:

hyde: Get rid of filepath dependency

Location:
release/4/hyde/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/hyde/trunk/hyde.meta

    r31865 r36884  
    33 (category web)
    44 (license "BSD")
    5  (needs filepath
    6         sxml-transforms
     5 (needs sxml-transforms
    76        doctype
    87        matchable
  • release/4/hyde/trunk/hyde.scm

    r31865 r36884  
    5959     utils
    6060     posix
    61      (rename filepath (filepath:make-relative pathname-relative-from))
    6261     sxml-transforms
    6362     doctype
     
    301300    (unless (and exited-normally (zero? status))
    302301      (error (format "error executing ~A ~A" name (string-intersperse args))))))
     302
     303(define (pathname-relative-from source dest)
     304  (let ((source (make-pathname source "/")))
     305    (if (string=? source (make-pathname dest "/"))
     306        "."
     307        (begin
     308          (assert (string-prefix? source dest) (format "path ~s is not a parent of ~s" source dest))
     309          (substring dest (string-length source))))))
    303310
    304311(define (make-output-path path #!optional page)
Note: See TracChangeset for help on using the changeset viewer.