old_contents:
(seval '(require file/glob))

(def glob (pat)
  (each path (seval!glob pat #:capture-dotfiles? #t)
    (let path (seval!path->string path)
      (if (dir-exists path)
          (out (+ path "/"))
          (out path)))))

new_contents:
(seval '(require file/glob))

(seval '(xdef cwd cwd))

(def glob (pat (o root (cwd)))
  (each path (seval!glob pat #:capture-dotfiles? #t)
    (aand (seval!path->string path)
          (if (dir-exists it) (+ it "/") it)
          (if (seval!string-prefix? it root)
              (cut it (len root))
              it)
          (out it))))

subject: Update GLOB to remove the cwd from each result

license: mit


new_contents:
(declare 'atstrings nil)

(system "rm -rf html")
(ensure-dir "html")
(load "template.arc")
(runall)

;; fails with "Expected tests" error
;; (run "foundation-doc.tem")
(system "cp foundation-doc.html html/")

(system "rm -rf output")
(ensure-dir "output")
(system "cp docs/* html/* output/")

message:
Disable atstrings when generating arcfn docs.

Maybe need to re-enable it when we add docs about atstrings. Currently
just disable it to make generate.arc works.