search for: current_dir_name

Displaying 3 results from an estimated 3 matches for "current_dir_name".

2015 Jun 12
0
[PATCH 2/3] get-kernel: add --unversioned-names
...s = [] then error (f_"no kernel found"); + let dest_filename fn = + let fn = Filename.basename fn in + if unversioned then fst (string_split "-" fn) + else fn in + (* Download the latest. *) let outputdir = match output with | None -> Filename.current_dir_name | Some dir -> dir in let kernel_in = List.hd kernels in - let kernel_out = outputdir // Filename.basename kernel_in in + let kernel_out = outputdir // dest_filename kernel_in in printf "download: %s -> %s\n%!" kernel_in kernel_out; g#download kernel_in kernel_out;...
2015 Jun 11
2
[PATCH] (Almost) new tool: virt-get-kernel
...let kernels = List.rev (List.sort compare_version kernels) in - let initrds = List.rev (List.sort compare_version initrds) in - - if kernels = [] then - error (f_"no kernel found"); - - (* Download the latest. *) - let outputdir = - match output with - | None -> Filename.current_dir_name - | Some dir -> dir in - let kernel_in = List.hd kernels in - let kernel_out = outputdir // Filename.basename kernel_in in - printf "download: %s -> %s\n%!" kernel_in kernel_out; - g#download kernel_in kernel_out; - - if initrds <> [] then ( - let initrd_in = List.h...
2015 Sep 01
3
[PATCH 1/3] get-kernel: split command line handling in own function
Simple refactoring, no actual behaviour changes. --- get-kernel/get_kernel.ml | 188 ++++++++++++++++++++++++----------------------- 1 file changed, 95 insertions(+), 93 deletions(-) diff --git a/get-kernel/get_kernel.ml b/get-kernel/get_kernel.ml index 8ca7ca0..3b27740 100644 --- a/get-kernel/get_kernel.ml +++ b/get-kernel/get_kernel.ml @@ -23,104 +23,106 @@ module G = Guestfs open Printf