Displaying 11 results from an estimated 11 matches for "read_envvars".
2015 Nov 11
2
[PATCH 1/2] dib: Make the interface between cmdline.ml and dib.ml explicit.
...l_elements = exclude_elements all_elements
- (excluded_elements @ builtin_elements_blacklist) in
+ (cmdline.excluded_elements @ builtin_elements_blacklist) in
message (f_"Expanded elements: %s") (String.concat " " (StringSet.elements all_elements));
- let envvars = read_envvars envvars in
+ let envvars = read_envvars cmdline.envvars in
message (f_"Carried environment variables: %s") (String.concat " " (List.map fst envvars));
if debug >= 1 then (
printf "carried over envvars:\n";
@@ -515,7 +515,7 @@ let main () =
message (f_...
2015 Nov 11
0
[PATCH 2/2] dib: Turn a few progress messages into info messages.
...ded_elements @ builtin_elements_blacklist) in
- message (f_"Expanded elements: %s") (String.concat " " (StringSet.elements all_elements));
+ info (f_"Expanded elements: %s")
+ (String.concat " " (StringSet.elements all_elements));
let envvars = read_envvars cmdline.envvars in
- message (f_"Carried environment variables: %s") (String.concat " " (List.map fst envvars));
+ info (f_"Carried environment variables: %s")
+ (String.concat " " (List.map fst envvars));
if debug >= 1 then (
printf "...
2015 Oct 06
0
[PATCH 5/5] mllib: Replace various ad hoc string_* functions with String.*
...quot;-p", Arg.String append_element_path, "path" ^ " " ^ s_"Add new a elements location";
diff --git a/dib/dib.ml b/dib/dib.ml
index 16149ae..caf13f2 100644
--- a/dib/dib.ml
+++ b/dib/dib.ml
@@ -37,7 +37,7 @@ let exclude_elements elements = function
let read_envvars envvars =
filter_map (
fun var ->
- let i = string_find var "=" in
+ let i = String.find var "=" in
if i = -1 then (
try Some (var, Sys.getenv var)
with Not_found -> None
@@ -49,7 +49,7 @@ let read_envvars envvars =
let read_di...
2015 Oct 06
10
[PATCH 0/5] mllib: Hide bad String functions and miscellaneous refactoring.
Hide/prevent the use of bad string functions like String.lowercase.
These are replaced by safe functions that won't break UTF-8 strings.
Other miscellaneous refactoring.
Rich.
2015 May 29
0
[PATCH v3] RFC: New virt-dib tool
...ule G = Guestfs
+
+let exclude_elements elements excluded_elements =
+ match excluded_elements with
+ | [] ->
+ (* No elements to filter out, so just don't bother iterating through
+ * the elements. *)
+ elements
+ | excl -> StringSet.filter (not_in_list excl) elements
+
+let read_envvars envvars =
+ filter_map (
+ fun var ->
+ let i = string_find var "=" in
+ if i = -1 then (
+ try Some (var, Sys.getenv var)
+ with Not_found -> None
+ ) else (
+ let len = String.length var in
+ Some (String.sub var 0 i, String.sub var (...
2015 Jul 03
1
[PATCH v5] New tool: virt-dib
...tils
+open Elements
+
+open Printf
+
+module G = Guestfs
+
+let exclude_elements elements = function
+ | [] ->
+ (* No elements to filter out, so just don't bother iterating through
+ * the elements. *)
+ elements
+ | excl -> StringSet.filter (not_in_list excl) elements
+
+let read_envvars envvars =
+ filter_map (
+ fun var ->
+ let i = string_find var "=" in
+ if i = -1 then (
+ try Some (var, Sys.getenv var)
+ with Not_found -> None
+ ) else (
+ let len = String.length var in
+ Some (String.sub var 0 i, String.sub var (...
2015 Mar 31
0
[PATCH] WIP: New virt-dib tool
...01 USA.
+ *)
+
+open Common_gettext.Gettext
+open Common_utils
+
+open Cmdline
+open Utils
+open Elements
+
+open Printf
+open Unix
+
+module G = Guestfs
+
+let exclude_elements elements excluded_elements =
+ StringSet.filter (fun x -> List.mem x excluded_elements <> true) elements
+
+let read_envvars envvars =
+ filter_map (
+ fun var ->
+ let len = String.length var in
+ let i = string_find var "=" in
+ if i = -1 then (
+ try Some (var, Sys.getenv var)
+ with Not_found -> None
+ ) else (
+ Some (String.sub var 0 i, String.sub var (i...
2015 Jun 16
2
[PATCH v4] RFC: New tool: virt-dib
...tils
+open Elements
+
+open Printf
+
+module G = Guestfs
+
+let exclude_elements elements = function
+ | [] ->
+ (* No elements to filter out, so just don't bother iterating through
+ * the elements. *)
+ elements
+ | excl -> StringSet.filter (not_in_list excl) elements
+
+let read_envvars envvars =
+ filter_map (
+ fun var ->
+ let i = string_find var "=" in
+ if i = -1 then (
+ try Some (var, Sys.getenv var)
+ with Not_found -> None
+ ) else (
+ let len = String.length var in
+ Some (String.sub var 0 i, String.sub var (...
2017 Nov 21
2
[PATCH v3 0/2] common/mlstdutils: Extend the List module.
v2 -> v3:
- Renamed List.assoc_ -> List.assoc_lbl.
- Rebased on top of current master branch.
Rich.
2017 Oct 08
4
[PATCH 0/3] common/mlstdutils: Add Std_utils List and Option modules.
In Std_utils we already extend Char and String. These commits take it
a little further by extending List and adding a new Option submodule.
All basically simple refactoring.
Rich.
2017 Oct 08
7
[[PATCH v2 0/4] common/mlstdutils: Add Std_utils List and Option modules.
This time including the first commit ...