diff options
Diffstat (limited to 'omkdir')
-rw-r--r-- | omkdir/Makefile | 8 | ||||
-rw-r--r-- | omkdir/omkdir.ml | 12 |
2 files changed, 20 insertions, 0 deletions
diff --git a/omkdir/Makefile b/omkdir/Makefile new file mode 100644 index 0000000..3ea1d08 --- /dev/null +++ b/omkdir/Makefile @@ -0,0 +1,8 @@ +make: + ocamlc unix.cma str.cma omkdir.ml -o omkdir + +static: + ocamlopt unix.cmxa -ccopt -static omkdir.ml -o omkdir + +clean: + rm -f *.cmi *.cmx *.o *.cmo
\ No newline at end of file diff --git a/omkdir/omkdir.ml b/omkdir/omkdir.ml new file mode 100644 index 0000000..4e4b053 --- /dev/null +++ b/omkdir/omkdir.ml @@ -0,0 +1,12 @@ +open Arg +open Scanf +open Printf +open Unix + +let argnum = Array.length Sys.argv + +let _ = + if argnum >= 2 then + let _ = mkdir Sys.argv.(1) 0o755 in () + else + Printf.printf "ERR only one argument\n"
\ No newline at end of file |