Hash :
e7d64223
Author :
Thomas de Grivel
Date :
2022-11-03T14:18:49
defmodule UpdateHeader do
def main(_args) do
IO.puts("update_header cli")
end
def update([src_path | dest]) do
module = case src_path do
"Makefile" -> Header.Make
"configure" -> Header.Make
"config.subr" -> Header.Make
_ ->
case Regex.run(~r/[.][ch]$/, src_path) do
[_] -> Header.C
_ ->
case Regex.run(~r/[.]exs?$/, src_path) do
[_] -> Header.Make
_ -> raise "error"
end
end
end
module.main([src_path | dest])
end
def run(argv) do
update(argv)
end
end