Hash :
ff60fe16
Author :
Thomas de Grivel
Date :
2022-11-03T14:30:51
## update_header
## Copyright 2022 kmx.io <contact@kmx.io>
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