add Quad version info to metadata (closes #53)
parent
3a21e7dd9a
commit
ec2f0724ce
@ -0,0 +1,9 @@
|
|||||||
|
#lang racket/base
|
||||||
|
(require racket/match pkg/path)
|
||||||
|
(provide pkg-checksum)
|
||||||
|
|
||||||
|
(define (pkg-checksum [pkg "quad"] #:short [short? #false])
|
||||||
|
(match (for/or ([scope (in-list '(user installation shared))])
|
||||||
|
(hash-ref (read-pkgs-db scope) pkg #false))
|
||||||
|
[(pkg-info _ checksum _) (if short? (substring checksum 0 7) checksum)]
|
||||||
|
[_ "checksum not found"]))
|
Loading…
Reference in New Issue