aboutsummaryrefslogtreecommitdiff
path: root/doc/checksum.scm
blob: 9474964ddd4bda268551eb1df33ea3418909f434 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(define md5sum
  (command #:inputs (file #:type File)
           #:run "md5sum" file
           #:outputs (md5 #:type stdout)
           #:stdout "md5"))

(define sha1sum
  (command #:inputs (file #:type File)
           #:run "sha1sum" file
           #:outputs (sha1 #:type stdout)
           #:stdout "sha1"))

(define sha256sum
  (command #:inputs (file #:type File)
           #:run "sha256sum" file
           #:outputs (sha256 #:type stdout)
           #:stdout "sha256"))

(workflow ((file #:type File))
  (tee (md5sum #:file file)
       (sha1sum #:file file)
       (sha256sum #:file file)))