From 99845b5c64da4e4c319bd0a9faabde6e3c5942bd Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 10 Jul 2022 00:20:27 -0500 Subject: [PATCH] Cleanup: Update controller examples. --- .../settings/example/entries/environment.entry | 7 +++++++ .../example/rules/environment/default.rule | 3 +++ .../settings/example/rules/environment/empty.rule | 3 +++ .../example/rules/environment/exported.rule | 3 +++ .../example/rules/environment/exporting.rule | 3 +++ .../example/rules/environment/fake-nothing.rule | 22 ++++++++++++++++++++++ .../example/rules/environment/fake-something.rule | 18 ++++++++++++++++++ .../data/settings/example/rules/print/newline.rule | 8 ++++++++ 8 files changed, 67 insertions(+) create mode 100644 level_3/controller/data/settings/example/rules/environment/fake-nothing.rule create mode 100644 level_3/controller/data/settings/example/rules/environment/fake-something.rule create mode 100644 level_3/controller/data/settings/example/rules/print/newline.rule diff --git a/level_3/controller/data/settings/example/entries/environment.entry b/level_3/controller/data/settings/example/entries/environment.entry index 137031c..a6978df 100644 --- a/level_3/controller/data/settings/example/entries/environment.entry +++ b/level_3/controller/data/settings/example/entries/environment.entry @@ -1,7 +1,14 @@ # fss-0005 +settings: + mode program + main: start environment default start environment exported start environment empty start environment exporting + start environment fake-nothing + start environment fake-something + + start print newline diff --git a/level_3/controller/data/settings/example/rules/environment/default.rule b/level_3/controller/data/settings/example/rules/environment/default.rule index 8c34d8c..4efe7e4 100644 --- a/level_3/controller/data/settings/example/rules/environment/default.rule +++ b/level_3/controller/data/settings/example/rules/environment/default.rule @@ -1,4 +1,7 @@ # fss-000d +# +# Note: bash automatically creates PWD, SHLVL, and _ environment variables. +# settings: name "Environment default" diff --git a/level_3/controller/data/settings/example/rules/environment/empty.rule b/level_3/controller/data/settings/example/rules/environment/empty.rule index 532da0c..c041187 100644 --- a/level_3/controller/data/settings/example/rules/environment/empty.rule +++ b/level_3/controller/data/settings/example/rules/environment/empty.rule @@ -1,4 +1,7 @@ # fss-000d +# +# Note: bash automatically creates PWD, SHLVL, and _ environment variables. +# settings: name "Environment set to nothing" diff --git a/level_3/controller/data/settings/example/rules/environment/exported.rule b/level_3/controller/data/settings/example/rules/environment/exported.rule index 2e01c29..d8c204f 100644 --- a/level_3/controller/data/settings/example/rules/environment/exported.rule +++ b/level_3/controller/data/settings/example/rules/environment/exported.rule @@ -1,4 +1,7 @@ # fss-000d +# +# Note: bash automatically creates PWD, SHLVL, and _ environment variables. +# settings: name "Environment with PATH" diff --git a/level_3/controller/data/settings/example/rules/environment/exporting.rule b/level_3/controller/data/settings/example/rules/environment/exporting.rule index 7b874c2..d2b3dad 100644 --- a/level_3/controller/data/settings/example/rules/environment/exporting.rule +++ b/level_3/controller/data/settings/example/rules/environment/exporting.rule @@ -1,4 +1,7 @@ # fss-000d +# +# Note: bash automatically creates PWD, SHLVL, and _ environment variables. +# settings: name "Environment with PATH" diff --git a/level_3/controller/data/settings/example/rules/environment/fake-nothing.rule b/level_3/controller/data/settings/example/rules/environment/fake-nothing.rule new file mode 100644 index 0000000..b0e596a --- /dev/null +++ b/level_3/controller/data/settings/example/rules/environment/fake-nothing.rule @@ -0,0 +1,22 @@ +# fss-000d + +settings: + name "Environment using fake as an engine" + engine fake ++quiet + + # PATH must be expoted so that "run env" works. + environment PATH + +script: + start { + settings\: + environment + + main\: + print + print "========================================" + print "Environment allowing nothing using fake." + print "========================================" + + run env + } diff --git a/level_3/controller/data/settings/example/rules/environment/fake-something.rule b/level_3/controller/data/settings/example/rules/environment/fake-something.rule new file mode 100644 index 0000000..bfe6851 --- /dev/null +++ b/level_3/controller/data/settings/example/rules/environment/fake-something.rule @@ -0,0 +1,18 @@ +# fss-000d + +settings: + name "Environment using fake as an engine" + engine fake ++quiet + + environment PATH PWD + +script: + start { + main\: + print + print "=============================================" + print "Environment allowing PATH and PWD using fake." + print "=============================================" + + run env + } diff --git a/level_3/controller/data/settings/example/rules/print/newline.rule b/level_3/controller/data/settings/example/rules/print/newline.rule new file mode 100644 index 0000000..0f2f489 --- /dev/null +++ b/level_3/controller/data/settings/example/rules/print/newline.rule @@ -0,0 +1,8 @@ +# fss-000d + +settings: + name "Print New Line" + engine bash + +script: + start echo -- 1.8.3.1