Welcome to mirror list, hosted at ThFree Co, Russian Federation.

json_script-example.json « examples - git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5328e599a5919e01c171e1125ab94e2e7782509d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
[
  [ "exec", "%EXECVAR%", "/%%/" ],
  [ "if",
    [ "eq", "EQVAR", "eqval" ],
    [ "exec_if", "%VAR%", "%%", "jk" ]
  ],
  [ "case", "CASEVAR", {
    "caseval0": ["cmd_case_0", "cmd_case_arg0", "case_cmd_arg1"],
    "caseval1": ["cmd_case_1", "cmd_case_arg0", "case_cmd_arg1"]
  } ],

  [ "if",
    [ "and", [ "eq", "EQVAR", "eqval" ],
             [ "has", "HASVAR" ],
             [ "regex", "REGEXVAR0", "regexval" ],
             [ "regex", "REGEXVAR1", [ "regexval10", "regexval11" ] ],
             [ "not", [ "eq", "NOTEQVAR", "noteqval" ] ] ],
    [ "exec_if_and", "%ANDVAR%" ]
  ],

  [ "if",
    [ "or", [ "eq", "EQVAR", "eqval" ],
            [ "has", "HASVAR" ],
            [ "regex", "REGEXVAR0", "regexval" ],
            [ "regex", "REGEXVAR1", [ "regexval10", "regexval11" ] ],
            [ "not", [ "eq", "NOTEQVAR", "noteqval" ] ] ],
    [ "exec_if_or", "%ORVAR%" ]
  ],

  [ "if",
	[ "isdir", "%ISDIRVAR%" ],
	[ "exec_isdir", "%ISDIRVAR%" ]
  ],

  [ "return", "foobar" ],

  [ "exec_non_reachable", "Arghhh" ]
]