all repos — min @ 99dcee2e98aae426ba47c68b2967ad49644c853e

A small but practical concatenative programming language.

tasks/h3rald.min

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
#!/usr/bin/env min

"_helpers" require :helpers 'helpers import

config /version :min-version
"Min_DeveloperGuide.htm" :guide-file
"../h3rald/assets/min/" guide-file suffix :h3rald-guide
"../h3rald/contents/min.md" :h3rald-min-md
"version:\\s+\\d+\\.\\d+\\.\\d+" :min-v-reg
"version: $#" (min-version) =% :min-v-rep

(
  symbol update
  (==>)
  (
    "Updating min Developer Guide and project on H3RALD.com..." notice!
    guide-file h3rald-guide cp
    h3rald-min-md fread "s/$#/$#/m" (min-v-reg min-v-rep) =% regex 0 get :updated-contents
    updated-contents h3rald-min-md fwrite
    "Done." notice!
  ) 
) ::
;; Updates the min Developer Guide and project page on H3RALD.com

(
  symbol build
  (==>)
  (
    "git" required
    "hastysite" required
    "Pulling content and rebuilding H3RALD.com web site..." notice!
    ; Assuming min and h3rald are siblings
    .. cd "h3rald" cd
    "git pull" !
    "hastysite build" !
    .. cd "min" cd
  )
) ::
;; Builds H3RALD.com web site