search for: do_mv

Displaying 20 results from an estimated 34 matches for "do_mv".

2017 Mar 07
0
[PATCH v4 8/9] mllib: add do_mv helper function to Common_utils
...9 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -1172,3 +1172,9 @@ let do_cp src destdir = let cmd = [ "cp"; "-t"; destdir; "-a"; src ] in if run_command cmd <> 0 then error (f_"copy of %s to %s failed") src destdir + +let do_mv src dest = + let cmd = [ "mv"; src; dest ] in + let r = run_command cmd in + if r <> 0 then + error (f_"moving file '%s' to '%s' failed") src dest diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli index 5c376fcb3..33d576b5e 100644 --- a/mll...
2017 Mar 23
0
[PATCH v5 08/10] mllib: add do_mv helper function to Common_utils
...9 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -1172,3 +1172,9 @@ let do_cp src destdir = let cmd = [ "cp"; "-t"; destdir; "-a"; src ] in if run_command cmd <> 0 then error (f_"copy of %s to %s failed") src destdir + +let do_mv src dest = + let cmd = [ "mv"; src; dest ] in + let r = run_command cmd in + if r <> 0 then + error (f_"moving file '%s' to '%s' failed") src dest diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli index 5c376fcb3..a98daad03 100644 --- a/mll...
2017 Apr 12
0
[PATCH v6 08/10] mllib: add do_mv helper function to Common_utils
...9 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -1191,3 +1191,9 @@ let do_cp src destdir = let cmd = [ "cp"; "-t"; destdir; "-a"; src ] in if run_command cmd <> 0 then error (f_"copy of %s to %s failed") src destdir + +let do_mv src dest = + let cmd = [ "mv"; src; dest ] in + let r = run_command cmd in + if r <> 0 then + error (f_"moving file '%s' to '%s' failed") src dest diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli index 937ef818b..64a0e8b9a 100644 --- a/mll...
2017 Sep 12
0
[PATCH v8 5/7] mllib: add do_mv helper function to Common_utils
...s(+) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 597128967..1126f233b 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -561,3 +561,9 @@ let inspect_decrypt g = * function. *) c_inspect_decrypt g#ocaml_handle (Guestfs.c_pointer g#ocaml_handle) + +let do_mv src dest = + let cmd = [ "mv"; src; dest ] in + let r = run_command cmd in + if r <> 0 then + error (f_"moving file '%s' to '%s' failed") src dest diff --git a/mllib/common_utils.mli b/mllib/common_utils.mli index fa4d15054..2c9d30a99 100644 --- a/mll...
2017 Sep 12
10
[PATCH v8 0/7] virt-builder-repository tool
...things mentioned by Pino, integrate Pino's osinfo ocaml iterator and adding a check of the mime type to filter potential image files. Cédric Bosdonnat (6): builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry function mllib: add do_mv helper function to Common_utils mllib: add XPath helper xpath_get_nodes() Add a virt-builder-repository tool Pino Toscano (1): ocaml osinfo database iterator .gitignore | 5 + builder/Makefile.am | 133 ++++- builder/...
2017 Feb 10
0
[PATCH v3 10/10] Add a virt-builder-repository tool
..."/libosinfo/os/short-id" "" in + if id <> "" then + ids := id :: !ids + ); + g#close (); + let ids_set = StringSet.of_list(!ids) in + osinfo_ids := Some ids_set; + ids_set + ) + +(* Move files in tmprepo into the repository *) +let do_mv src dest = + let cmd = [ "mv"; src; dest ] in + run_command cmd + +let compress_to file outdir = + info "Copying image to temporary folder ...%!"; + let outimg = outdir // (Filename.basename file) in + let cmd = [ "cp" ] @ + (if verbose () then [ "-v"...
2017 Sep 18
0
[PATCH v9 7/7] New tool: virt-builder-repository
...= gpgkey; + interactive = interactive; + keep_unsigned = keep_unsigned; + no_compression = no_compression; + repo = repo; + } + +let increment_revision = function + | Utils.Rev_int n -> Utils.Rev_int (n + 1) + | Utils.Rev_string s -> Utils.Rev_int ((int_of_string s) + 1) + +let do_mv src dest = + let cmd = [ "mv"; src; dest ] in + let r = run_command cmd in + if r <> 0 then + error (f_"moving file ‘%s’ to ‘%s’ failed") src dest + +let checksums_get_sha512 = function + | None -> Checksums.SHA512 "" + | Some csums -> + try +...
2017 Oct 05
0
[PATCH v11 6/6] New tool: virt-builder-repository
...= gpgkey; + interactive = interactive; + keep_unsigned = keep_unsigned; + no_compression = no_compression; + repo = repo; + } + +let increment_revision = function + | Utils.Rev_int n -> Utils.Rev_int (n + 1) + | Utils.Rev_string s -> Utils.Rev_int ((int_of_string s) + 1) + +let do_mv src dest = + let cmd = [ "mv"; src; dest ] in + let r = run_command cmd in + if r <> 0 then + error (f_"moving file ‘%s’ to ‘%s’ failed") src dest + +let checksums_get_sha512 = function + | None -> Checksums.SHA512 "" + | Some csums -> + try +...
2017 Nov 13
0
[PATCH v12 3/3] New tool: virt-builder-repository
...ry folder.") + | _ -> + error (f_"too many parameters, only one path to repository is allowed") in + + { + gpg = gpg; + gpgkey = gpgkey; + interactive = interactive; + keep_unsigned = keep_unsigned; + compression = compression; + repo = repo; + } + +let do_mv src dest = + let cmd = [ "mv"; src; dest ] in + let r = run_command cmd in + if r <> 0 then + error (f_"moving file ‘%s’ to ‘%s’ failed") src dest + +let checksums_get_sha512 = function + | None -> None + | Some csums -> + try + Some (List.find (...
2017 Mar 07
0
[PATCH v4 9/9] Add a virt-builder-repository tool
...of it *) + if not cmdline.keep_unsigned then + Sys.remove (tmprepo // "index") + ); + + message (f_"Creating index backup copy"); + + List.iter ( + fun filename -> + let filepath = cmdline.repo // filename in + if Sys.file_exists filepath then + do_mv filepath (filepath ^ ".bak") + ) ["index"; "index.asc"]; + + message (f_"Moving files to final destination"); + + Array.iter ( + fun filename -> + do_mv (tmprepo // filename) cmdline.repo + ) (Sys.readdir tmprepo); + + debug "Cleanup&quot...
2017 Mar 23
0
[PATCH v5 10/10] Add a virt-builder-repository tool
...of it *) + if not cmdline.keep_unsigned then + Sys.remove (tmprepo // "index") + ); + + message (f_"Creating index backup copy"); + + List.iter ( + fun filename -> + let filepath = cmdline.repo // filename in + if Sys.file_exists filepath then + do_mv filepath (filepath ^ ".bak") + ) ["index"; "index.asc"]; + + message (f_"Moving files to final destination"); + + Array.iter ( + fun filename -> + do_mv (tmprepo // filename) cmdline.repo + ) (Sys.readdir tmprepo); + + debug "Cleanup&quot...
2017 Mar 07
15
[PATCH v4 0/9] Introducing virt-builder-repository
...ract xml processing into a callback lib: extract osinfo DB traversing API mllib: ocaml wrapper for lib/osinfo builder: rename docs test script builder: add Index_parser.write_entry function builder: add a template parameter to get_index dib: move do_cp to mllib.Commun_utils mllib: add do_mv helper function to Common_utils Add a virt-builder-repository tool .gitignore | 4 + builder/Makefile.am | 121 +++++- builder/builder.ml | 2 +- builder/index.mli...
2017 Apr 12
0
[PATCH v6 10/10] Add a virt-builder-repository tool
...of it *) + if not cmdline.keep_unsigned then + Sys.remove (tmprepo // "index") + ); + + message (f_"Creating index backup copy"); + + List.iter ( + fun filename -> + let filepath = cmdline.repo // filename in + if Sys.file_exists filepath then + do_mv filepath (filepath ^ ".bak") + ) ["index"; "index.asc"]; + + message (f_"Moving files to final destination"); + + Array.iter ( + fun filename -> + do_mv (tmprepo // filename) cmdline.repo + ) (Sys.readdir tmprepo); + + debug "Cleanup&quot...
2017 Jun 19
0
[PATCH v7 9/9] Add a virt-builder-repository tool
...of it *) + if not cmdline.keep_unsigned then + Sys.remove (tmprepo // "index") + ); + + message (f_"Creating index backup copy"); + + List.iter ( + fun filename -> + let filepath = cmdline.repo // filename in + if Sys.file_exists filepath then + do_mv filepath (filepath ^ ".bak") + ) ["index"; "index.asc"]; + + message (f_"Moving files to final destination"); + + Array.iter ( + fun filename -> + do_mv (tmprepo // filename) cmdline.repo + ) (Sys.readdir tmprepo); + + debug "Cleanup&quot...
2017 Sep 12
0
[PATCH v8 7/7] Add a virt-builder-repository tool
...of it *) + if not cmdline.keep_unsigned then + Sys.remove (tmprepo // "index") + ); + + message (f_"Creating index backup copy"); + + List.iter ( + fun filename -> + let filepath = cmdline.repo // filename in + if Sys.file_exists filepath then + do_mv filepath (filepath ^ ".bak") + ) ["index"; "index.asc"]; + + message (f_"Moving files to final destination"); + + Array.iter ( + fun filename -> + do_mv (tmprepo // filename) cmdline.repo + ) (Sys.readdir tmprepo); + + debug "Cleanup&quot...
2017 Sep 20
6
[PATCH v10 0/6] virt-builder-repository
Hi all, Diff to v9 includes the changes requested by Pino. Cédric Bosdonnat (5): builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry function mllib: add XPath helper xpath_get_nodes() New tool: virt-builder-repository Pino Toscano (1): builder: add simple OCaml osinfo-db reader .gitignore
2017 Jun 19
11
[PATCH v7 0/9] Introducing virt-builder-repository
...tch. Cédric Bosdonnat (9): lib/osinfo.c: Extract xml processing into a callback lib: extract osinfo DB traversing API mllib: ocaml wrapper for lib/osinfo builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry function mllib: add do_mv helper function to Common_utils mllib: add XPath helper xpath_get_nodes() Add a virt-builder-repository tool .gitignore | 4 + builder/Makefile.am | 124 ++++- builder/builder.ml | 2 +-...
2017 Nov 21
5
[PATCH v13 0/3] virt-builder-repository
Hey there, Here is an update of the series. The changes: * Incorporate Richard's comments. Left out the with_openfile one since that leads to a double close. * Change the ask option return type to string (removing the option) since if the use doesn't input anything we're using the default, and the default is now a mandatory parameter. * Make sure there are items in the
2017 Sep 18
11
[PATCH v9 0/7] virt-builder-repository
Hi there, Diffs to v8: * Remove the regex to increment the revision: Index_parser.get_entry() only handles integers * Fix Pino's comments Cédric Bosdonnat (6): builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry function mllib: add XPath helper xpath_get_nodes() builder: remove useless fish dependency New tool:
2017 Apr 12
12
[PATCH v6 00/10] Add a virt-builder-repository tool
....c: Extract xml processing into a callback lib: extract osinfo DB traversing API mllib: ocaml wrapper for lib/osinfo builder: rename docs test script builder: add a template parameter to get_index builder: add Index.write_entry function dib: move do_cp to mllib.Commun_utils mllib: add do_mv helper function to Common_utils mllib: add XPath helper xpath_get_nodes() Add a virt-builder-repository tool .gitignore | 4 + builder/Makefile.am | 124 ++++- builder/builder.ml | 2 +-...