Bump to 1.14.1
[platform/upstream/augeas.git] / lenses / authinfo2.aug
1 (* Authinfo2 module for Augeas                    *)
2 (* Author: Nicolas Gif <ngf18490@pm.me>           *)
3 (* Heavily based on DPUT module by Raphael Pinson *)
4 (* <raphink@gmail.com>                            *)
5 (*                                                *)
6
7 module Authinfo2 =
8   autoload xfm
9
10 (************************************************************************
11  * INI File settings
12  *************************************************************************)
13 let comment  = IniFile.comment IniFile.comment_re "#"
14
15 let sep      = IniFile.sep IniFile.sep_re ":"
16
17
18 (************************************************************************
19  *                        ENTRY
20  *************************************************************************)
21 let entry =
22     IniFile.entry_generic_nocomment (key IniFile.entry_re) sep IniFile.comment_re comment
23
24
25 (************************************************************************
26  *                         TITLE & RECORD
27  *************************************************************************)
28 let title       = IniFile.title IniFile.record_re
29 let record      = IniFile.record title entry
30
31
32 (************************************************************************
33  *                         LENS & FILTER
34  *************************************************************************)
35 let lns    = IniFile.lns record comment
36
37 let filter = (incl (Sys.getenv("HOME") . "/.s3ql/authinfo2"))
38
39 let xfm = transform lns filter