36aa1b3fe9
The regression was introduced in commit 3567694
. I wrongly assumed that
`git fetch -pq origin HEAD` would fetch from the remote default branch.
Fixes #423
40 lines
1 KiB
Text
40 lines
1 KiB
Text
<%
|
|
class Zim
|
|
attr_reader :home, :min_zsh_version, :startup_files_glob, :version, :ellipsis, :okay, :warn, :error, :done, :failed
|
|
|
|
def initialize
|
|
@home = "${ZDOTDIR:-${HOME}}"
|
|
@min_zsh_version = "5.2"
|
|
@startup_files_glob = ".z(shenv|profile|shrc|login|logout)"
|
|
@version = "1.4.1-SNAPSHOT"
|
|
@ellipsis = " ..."
|
|
@okay = "%F{green})%f "
|
|
@warn = "! "
|
|
@error = "x "
|
|
@done = ""
|
|
@failed = ""
|
|
end
|
|
|
|
def render(filename)
|
|
ERB.new(File.read(filename)).result(binding)
|
|
end
|
|
|
|
def render_all(pattern)
|
|
Dir[pattern].sort.map { |filename| render(filename) }.join("\n")
|
|
end
|
|
|
|
def render_escaped(filename)
|
|
render(filename).gsub(/(?=\$[^']|"|`)/, "\\\\").gsub(/#\{/, "$\{")
|
|
end
|
|
|
|
def render_commented(filename)
|
|
render(filename).gsub(/^(?=.)/, "# ").gsub(/^$/, "#")
|
|
end
|
|
end
|
|
zim = Zim.new
|
|
%># AUTOMATICALLY GENERATED FILE. EDIT ONLY THE SOURCE FILES AND THEN COMPILE.
|
|
# DO NOT DIRECTLY EDIT THIS FILE!
|
|
|
|
<%= zim.render_commented("LICENSE") %>
|
|
<%= zim.render_all("src/stage2/*.erb") %>
|
|
zimfw "${@}"
|