Commit 89cb822fcbf49c0306cb5c7796ac7984181ea405

Thomas de Grivel 2022-11-04T06:35:59

fix cli

diff --git a/lib/update_header.ex b/lib/update_header.ex
index 752b755..c78848b 100644
--- a/lib/update_header.ex
+++ b/lib/update_header.ex
@@ -3,10 +3,17 @@
 
 defmodule UpdateHeader do
 
-  def main(_args) do
-    IO.puts("update_header cli")
+  def main(argv) do
+    IO.puts("update_header #{argv}")
+    update(argv)
   end
 
+  def update([]) do
+    IO.puts("no source")
+  end
+  def update([_]) do
+    IO.puts("no destination")
+  end
   def update([src_path | dest]) do
     module = case src_path do
                "Makefile" -> Header.Make