Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Beginnings of bringing the documentation up to date.

  • Loading branch information...
commit ee2947cc3aa58debebccc3002d51f027671468e4 1 parent cd90eaf
Wayne E. Seguin wayneeseguin authored

Showing 66 changed files with 123 additions and 5,177 deletions. Show diff stats Hide diff stats

  1. +7 19 content/modules/shell/array.haml
  2. +0 244 content/modules/shell/array/dsl.haml
  3. +0 2  content/modules/shell/array/dsl.yaml
  4. +29 0 content/modules/shell/config.haml
  5. 0  content/modules/shell/{defaults.yaml → config.yaml}
  6. +9 14 content/modules/shell/core.haml
  7. +0 88 content/modules/shell/core/dsl.haml
  8. +0 2  content/modules/shell/core/dsl.yaml
  9. +0 33 content/modules/shell/defaults.haml
  10. +0 49 content/modules/shell/defaults/dsl.haml
  11. +0 2  content/modules/shell/defaults/dsl.yaml
  12. +0 107 content/modules/shell/environment/dsl.haml
  13. +0 2  content/modules/shell/environment/dsl.yaml
  14. +0 332 content/modules/shell/extensions/dsl.haml
  15. +0 2  content/modules/shell/extensions/dsl.yaml
  16. +0 893 content/modules/shell/filesystem/dsl.haml
  17. +0 2  content/modules/shell/filesystem/dsl.yaml
  18. +0 318 content/modules/shell/help/dsl.haml
  19. +0 2  content/modules/shell/help/dsl.yaml
  20. 0  content/modules/shell/{environment.haml → interactive.haml}
  21. 0  content/modules/shell/{environment.yaml → interactive.yaml}
  22. +6 19 content/modules/shell/logging.haml
  23. +0 167 content/modules/shell/logging/dsl.haml
  24. +0 2  content/modules/shell/logging/dsl.yaml
  25. +5 18 content/modules/shell/modules.haml
  26. +0 236 content/modules/shell/modules/dsl.haml
  27. +0 2  content/modules/shell/modules/dsl.yaml
  28. +8 33 content/modules/shell/package.haml
  29. +0 468 content/modules/shell/package/dsl.haml
  30. +0 2  content/modules/shell/package/dsl.yaml
  31. +0 46 content/modules/shell/paranoid.haml
  32. +0 2  content/modules/shell/paranoid.yaml
  33. +0 21 content/modules/shell/paranoid/dsl.haml
  34. +0 2  content/modules/shell/paranoid/dsl.yaml
  35. +7 12 content/modules/shell/project.haml
  36. +0 62 content/modules/shell/project/dsl.haml
  37. +0 2  content/modules/shell/project/dsl.yaml
  38. +0 38 content/modules/shell/rvm.haml
  39. +0 2  content/modules/shell/rvm.yaml
  40. +0 83 content/modules/shell/rvm/dsl.haml
  41. +0 2  content/modules/shell/rvm/dsl.yaml
  42. +7 38 content/modules/shell/service.haml
  43. +0 584 content/modules/shell/service/dsl.haml
  44. +0 2  content/modules/shell/service/dsl.yaml
  45. +9 23 content/modules/shell/system.haml
  46. +0 258 content/modules/shell/system/dsl.haml
  47. +0 2  content/modules/shell/system/dsl.yaml
  48. +8 14 content/modules/shell/templates.haml
  49. +0 97 content/modules/shell/templates/dsl.haml
  50. +0 2  content/modules/shell/templates/dsl.yaml
  51. +6 14 content/modules/shell/time.haml
  52. +0 76 content/modules/shell/time/dsl.haml
  53. +0 2  content/modules/shell/time/dsl.yaml
  54. +0 44 content/modules/shell/trace.haml
  55. +0 2  content/modules/shell/trace.yaml
  56. +0 263 content/modules/shell/trace/dsl.haml
  57. +0 2  content/modules/shell/trace/dsl.yaml
  58. +8 19 content/modules/shell/users.haml
  59. +0 178 content/modules/shell/users/dsl.haml
  60. +0 2  content/modules/shell/users/dsl.yaml
  61. +6 17 content/modules/shell/variables.haml
  62. +0 176 content/modules/shell/variables/dsl.haml
  63. +0 2  content/modules/shell/variables/dsl.yaml
  64. +8 8 content/modules/shell/vcs.haml
  65. +0 20 content/modules/shell/vcs/dsl.haml
  66. +0 2  content/modules/shell/vcs/dsl.yaml
26 content/modules/shell/array.haml
@@ -16,26 +16,14 @@
16 16 Array Module
17 17
18 18 %h2 What it does
19   -The Array Module adds array manipulation functionality within the BDSM framework, such as push, unshift, length, and join operations.
20 19
21   -%h2 Functions
  20 +The Array Module adds array manipulation functionality within the SM framework,
  21 +such as push, unshift, length, and join operations.
22 22
23   -%pre.code
24   - :preserve
25   - array_is_nonempty()
26   - array_last_element()
27   - array_first_element()
28   - array_push()
29   - array_length()
30   - array_unshift()
31   - array_join()
32   - array_largest()
  23 +%h2 Help us!!!
33 24
34   -%h2
35   - DSL
36   -%p
37   - Read the
38   - %a{:href => "/modules/shell/array/dsl/"}
39   - Array module DSL documentation
40   - for more detail on the individual Array functions.
  25 +This document needs you're help! Please
  26 +%a{:href => "https://github.com/sm/website/edit/master/content/modules/shell/array.haml"}
  27 + Edit on GitHub
  28 +and send a pull request!
41 29
244 content/modules/shell/array/dsl.haml
... ... @@ -1,244 +0,0 @@
1   -.breadcrumbs
2   - %a{ :href => "/" }
3   - Documentation
4   -  > 
5   - %a{ :href => "/modules/" }
6   - Modules
7   -  > 
8   - %a{ :href => "/modules/shell/" }
9   - Shell
10   -  > 
11   - %a{ :href => "/modules/shell/array/" }
12   - array
13   -  > 
14   - %a{ :href => "/modules/shell/array/dsl/" }
15   - DSL API :: array
16   - %hr
17   -
18   -%h1
19   - Module array
20   -
21   -%h2 array_is_nonempty()
22   -%p Checks to see if an array with the name given as the first parameter is nonempty.
23   -%h4 Input Parameters
24   -%p The first parameter is the name of the array variable.
25   -%h4 Stream Outputs
26   -%p None.
27   -%h4 Return Codes
28   -%p
29   - 0 if the array is non-empty.
30   - 1 if the array is empty.
31   -%h4 Failure Scenarios
32   -%p Fails if the array name, the first parameter, is not given.
33   -%h4 Usage Examples
34   -%pre
35   - %code
36   - :preserve
37   - user$ the_array=(1 2 3 4 5)
38   - user$ array_is_nonempty the_array
39   - user$ echo $?
40   - 0
41   -
42   - user$ the_array=()
43   - user$ array_is_nonempty the_array
44   - user$ echo $?
45   - 1
46   -%h2 array_length()
47   -%p Return the length of the given array.
48   -%h4 Input Parameters
49   -%p First parameter is the name of the array variable.
50   -%h4 Stream Outputs
51   -%p
52   - Prints the length of the named array to the STDOUT stream of the calling
53   - environment.
54   -%h4 Return Codes
55   -%p returns 0
56   -%h4 Failure Scenarios
57   -%p Fails if the array name, first parameter, is not given.
58   -%h4 Usage Examples
59   -%pre
60   - %code
61   - :preserve
62   - user$ the_array=(1 2 3 4 5)
63   - user$ array_length the_array
64   - 5
65   -%h2 array_last_element()
66   -%p Print the last element of the given array.
67   -%h4 Input Parameters
68   -%p First parameter is the name of the array variable.
69   -%h4 Stream Outputs
70   -%p
71   - Prints the last element of the named array to the STDOUT stream of the
72   - calling environment.
73   -%h4 Failure Scenarios
74   -%p Fails if the array name, first parameter, is not given.
75   -%h4 Return Codes
76   -%p 0 denoting success
77   -%h4 Usage Examples
78   -%pre
79   - %code
80   - :preserve
81   - $ the_array=(one two three four five)
82   - $ array_last_element the_array
83   - five
84   -%h2 array_first_element()
85   -%p Print the first element of the given array.
86   -%h4 Input Parameters
87   -%p First parameter is the name of the array variable.
88   -%h4 Stream Outputs
89   -%p
90   - Prints the first element of the named array to the STDOUT stream of the
91   - calling environment.
92   -%h4 Return Codes
93   -%p 0 denoting success
94   -%h4 Failure Scenarios
95   -%p Fails if the array name, the first parameter, is not given.
96   -%h4 Usage Examples
97   -%pre
98   - %code
99   - :preserve
100   - $ the_array=(one two three four five)
101   - $ array_first_element the_array
102   - one
103   -%h2 array_push()
104   -%p Appends one or more elements to the array with the given name.
105   -%h4 Input Parameters
106   -%p
107   - The first parameter is the name of the array variable.
108   - Remaining parameters are the elements to be appended to the array.
109   -%h4 Stream Outputs
110   -%p None.
111   -%h4 Returns
112   -%p 0 denoting success
113   -%h4 Failure Scenarios
114   -%p
115   - Fails if the array name, the first parameter, is not given.
116   - Fails if no elements were given (second paramater and beyond).
117   -%h4 Usage Examples
118   -%pre
119   - %code
120   - :preserve
121   - $ the_array=(1 2 3 4 5)
122   - $ array_length the_array
123   - 5
124   -%h2 array_append()
125   -%p Append elements to a named array.
126   -%h4 Input Parameters
127   -%p
128   - The first parameter is the name of the array variable.
129   - Remaining parameters are the elements to append to the end of the array.
130   -%h4 Stream Outputs
131   -%p None.
132   -%h4 Returns
133   -%p 0 denoting success
134   -%h4 Failure Scenarios
135   -%p
136   - Fails if the array name, the first parameter, is not given.
137   - Fails if no elements were given to append to the array.
138   -%h4 Usage Examples
139   -%pre
140   - %code
141   - :preserve
142   - user$ the_array=(1)
143   - user$ array_append the_array 2 3 4 5
144   - user$ array_join the_array # print the contents of the array, space separated.
145   - 1 2 3 4 5
146   -%h2 array_length()
147   -%p Return the length of the given array.
148   -%h4 Input Parameters
149   -%p The first parameter is the name of the array variable.
150   -%h4 Stream Outputs
151   -%p Prints the length of the named array to the STDOUT stream of the calling environment.
152   -%h4 Usage Examples
153   -%pre
154   - %code
155   - :preserve
156   - user$ cat $HOME/test
157   - #!/usr/bin/env bdsm
158   -
159   - modules bdsm/array
160   -
161   - my_array=(1 2 3 4)
162   - echo ${my_array[@]}
163   - array_shift my_array
164   - echo ${my_array[@]}
165   -
166   - user$ $HOME/test
167   - 1 2 3 4
168   - 1
169   - 2 3 4
170   -%h2 array_unshift()
171   -%p
172   - Prepends one or more elements to the array whose name is given, in the order
173   - given.
174   -%h4 Input Parameters Parameters
175   -%p
176   - The first parameter is the name of the array variable.
177   - Remaining parameters are the elements to prepend to the array.
178   -%h4 Stream Outputs
179   -%p
180   - None.
181   - Yields a failure message if no array name was given.
182   - Yields a failure message if no elements were given to unshift.
183   -%h4 Return Codes
184   -%p 0 denoting success
185   -%h4 Usage Examples
186   -%pre
187   - %code
188   - :preserve
189   - $ the_array=(2 3 4 5)
190   - $ array_unshift 1
191   - user$ array_join the_array # print the contents of the array, space separated.
192   - 1 2 3 4 5
193   -
194   - $ the_array=(4 5)
195   - $ array_unshift 3 2 1
196   - user$ array_join the_array # print the contents of the array, space separated.
197   - 1 2 3 4 5
198   -%h2 array_join()
199   -%p Joins the named array into a string separated by either a space or a given string.
200   -%h4 Input Parameters
201   -%p
202   - The first parameter is the name of the array variable.
203   - The second parameter is the separator between elements in the string, this is optional and defaults to a space.
204   -%h4 Stream Outputs
205   -%p
206   - Prints the elements of the named array, separted by either the 2nd parameter
207   - if given or else a space character, to the STDOUT stream of the calling
208   - environment.
209   -%h4 Return Codes
210   -%p 0 denoting success
211   -%h4 Failure Scenarios
212   -%p Fails if the array name, the first parameter, is not given.
213   -%h4 Usage Examples
214   -%pre
215   - %code
216   - :preserve
217   - $ the_array=(1 2 3 4 5)
218   - $ array_join the_array
219   - 1 2 3 4 5
220   -
221   - $ array_join the_array '.'
222   - 1.2.3.4.5
223   -%h2 array_largest()
224   -%p Outputs the largest element of the array, in the sense of longest string.
225   -%h4 Input Parameters
226   -%p The first element is an array variable name.
227   -%h4 Stream Outputs
228   -%p
229   - Prints the largest elements of the named array to the STDOUT
230   - stream of the calling environment.
231   -%h4 Return Codes
232   -%p 0 denoting success
233   -%h4 Failure Scenarios
234   -%p Fails if the array name, the first parameter, is not given.
235   -%h4 Usage Examples
236   -%pre
237   - %code
238   - :preserve
239   - $ the_array=(1 2 3 4 5)
240   - $ array_join the_array
241   - 1 2 3 4 5
242   -
243   - $ array_join the_array '.'
244   - 1.2.3.4.5
2  content/modules/shell/array/dsl.yaml
... ... @@ -1,2 +0,0 @@
1   ----
2   -title: "DSL API :: array"
29 content/modules/shell/config.haml
... ... @@ -0,0 +1,29 @@
  1 +.breadcrumbs
  2 + %a{ :href => "/" }
  3 + Documentation
  4 +  > 
  5 + %a{ :href => "/modules/" }
  6 + Modules
  7 +  > 
  8 + %a{ :href => "/modules/shell/" }
  9 + Shell
  10 +  > 
  11 + %a{ :href => "/modules/shell/config/" }
  12 + config
  13 + %hr
  14 +
  15 +%h1
  16 + config Module
  17 +
  18 +%h2 What it does
  19 +
  20 +The config Module creates a convention for retrieving default settings for a given extension.
  21 +
  22 +%h2 Help us!!!
  23 +
  24 +This document needs you're help! Please
  25 +%a{:href => "https://github.com/sm/website/edit/master/content/modules/shell/config.haml"}
  26 + Edit on GitHub
  27 +and send a pull request!
  28 +
  29 +
0  content/modules/shell/defaults.yaml → content/modules/shell/config.yaml
File renamed without changes
23 content/modules/shell/core.haml
@@ -16,20 +16,15 @@
16 16 Core Module
17 17
18 18 %h2 What it does
19   -The Core Module contains functionality key to the development of the BDSM framework. It's unlikely you'll need to use these functions.
20 19
21   -%h2 Functions
  20 +The Core Module contains functionality key to the development of the SM framework.
  21 +It's unlikely you'll need to use these functions.
  22 +
  23 +%h2 Help us!!!
  24 +
  25 +This document needs you're help! Please
  26 +%a{:href => "https://github.com/sm/website/edit/master/content/modules/shell/core.haml"}
  27 + Edit on GitHub
  28 +and send a pull request!
22 29
23   -%pre.code
24   - :preserve
25   - bdsm_exports()
26   - bdsm_version()
27   - NIY()
28 30
29   -%h2
30   - DSL
31   -%p
32   - Read the
33   - %a{:href => "/modules/shell/core/dsl/"}
34   - Core module DSL documentation
35   - for more detail on the individual Core functions.
88 content/modules/shell/core/dsl.haml
... ... @@ -1,88 +0,0 @@
1   -.breadcrumbs
2   - %a{ :href => "/" }
3   - Documentation
4   -  > 
5   - %a{ :href => "/modules/" }
6   - Modules
7   -  > 
8   - %a{ :href => "/modules/shell/" }
9   - Shell
10   -  > 
11   - %a{ :href => "/modules/shell/core/" }
12   - core
13   -  > 
14   - %a{ :href => "/modules/shell/core/dsl/" }
15   - DSL API :: core
16   - %hr
17   -
18   -%h1
19   - Module core
20   -
21   -%h2 bdsm_exports()
22   -%p
23   - Exports bdsm framework relevant environment variables for extension action
24   - processes.
25   -%h4 Input Parameters
26   -%p None.
27   -%h4 Stream Outputs
28   -%p None.
29   -%h4 Return Codes
30   -%p 0 for success.
31   -%h4 Failure Scenarios
32   -%p No failure scenarios currently.
33   -%h4 Usage Examples
34   -%pre
35   - %code
36   - :preserve
37   - user$ bdsm_exports
38   -%h2 bdsm_version()
39   -%p Reads the currently installed bdsm version into the variable 'bdsm_version'.
40   -%h4 Input Parameters
41   -%p None.
42   -%h4 Stream Outputs
43   -%p None.
44   -%h4 Environmental effects
45   -%p The variable 'bdsm_version' will be set after the function is executed.
46   -%h4 Return Codes
47   -%p 0 for success.
48   -%h4 Failure Scenarios
49   -%p No failure scenarios currently.
50   -%h4 Usage Examples
51   -%pre
52   - %code
53   - :preserve
54   - user$ bdsm_version
55   - user$ echo $bdsm_version
56   - 69.69.69
57   -%h2 NIY()
58   -%p
59   - Prints a failure message and backtrace to the screen letting the caller know
60   - that the requested feature has not yet been implemented.
61   -%h4 Input Parameters
62   -%p None.
63   -%h4 Stream Outputs
64   -%p
65   - Prints "This feature has not yet been implemented." to STDERR of the calling
66   - environment.
67   -%h4 Environmental effects
68   -%p None.
69   -%h4 Return Codes
70   -%p None, only exit is through failure.
71   -%h4 Failure Scenarios
72   -%p Fails always.
73   -%h4 Usage Examples
74   -%pre
75   - %code
76   - :preserve
77   - user$ cat $HOME/test
78   - #!/usr/bin/env bdsm
79   - NIY
80   -
81   - user$ $HOME/test
82   - ERROR: This feature has not yet been implemented.
83   - Backtrace:
84   - Trace Line Function File
85   - 3. 262 fail() /usr/local/bdsm/modules/bash/logging/dsl
86   - 2. 5 NIY() /usr/local/bdsm/modules/bash/extensions/dsl
87   - 1. 5 main() /Users/wayneeseguin/test
88   - > modules/bash/logging/dsl fail() 263 $ exit 1
2  content/modules/shell/core/dsl.yaml
... ... @@ -1,2 +0,0 @@
1   ----
2   -title: "DSL API :: core"
33 content/modules/shell/defaults.haml
... ... @@ -1,33 +0,0 @@
1   -.breadcrumbs
2   - %a{ :href => "/" }
3   - Documentation
4   -  > 
5   - %a{ :href => "/modules/" }
6   - Modules
7   -  > 
8   - %a{ :href => "/modules/shell/" }
9   - Shell
10   -  > 
11   - %a{ :href => "/modules/shell/defaults/" }
12   - defaults
13   - %hr
14   -
15   -%h1
16   - Defaults Module
17   -
18   -%h2 What it does
19   -The Defaults Module creates a convention for retrieving default settings for a given extension.
20   -
21   -%h2 Functions
22   -
23   -%pre.code
24   - :preserve
25   - read_default()
26   -
27   -%h2
28   - DSL
29   -%p
30   - Read the
31   - %a{:href => "/modules/shell/defaults/dsl/"}
32   - Defaults module DSL documentation
33   - for more detail on the individual Defaults functions.
49 content/modules/shell/defaults/dsl.haml
... ... @@ -1,49 +0,0 @@
1   -.breadcrumbs
2   - %a{ :href => "/" }
3   - Documentation
4   -  > 
5   - %a{ :href => "/modules/" }
6   - Modules
7   -  > 
8   - %a{ :href => "/modules/shell/" }
9   - Shell
10   -  > 
11   - %a{ :href => "/modules/shell/defaults/" }
12   - defaults
13   -  > 
14   - %a{ :href => "/modules/shell/defaults/dsl/" }
15   - DSL API :: defaults
16   - %hr
17   -
18   -%h1
19   - Module defaults
20   -
21   -%h2 read_default()
22   -%p Reads default values from an extension's config/defaults file.
23   -%h4 Input Parameters
24   -%p
25   - First parameter is the defaults file key to read (key=value).
26   - Second parameter is the variable name to store the retrieved value in.
27   - Remaining parameters are parsed out as token, value and prefix
28   - into|as
29   - %variable{:name => ""}
30   - prefix
31   - %name
32   - %variable # If no specifier.
33   -%h4 Stream Outputs
34   -%p None.
35   -%h4 Environmental effects
36   -%p
37   - A variable will be set to the value, if the value is nonempty. If no variable
38   - name is specified the variable will be assigned the same name as the key.
39   -%h4 Return Codes
40   -%p 0 for success.
41   -%h4 Failure Scenarios
42   -%p Fails if no arguments are passed in, at least need to specify a key.
43   -%h4 Usage Examples
44   -%pre
45   - %code
46   - :preserve
47   - user$ read_default "version" prefix "package" # extension is nginx for example
48   - user$ echo $package_version
49   - 1.0.0
2  content/modules/shell/defaults/dsl.yaml
... ... @@ -1,2 +0,0 @@
1   ----
2   -title: "DSL API :: defaults"
107 content/modules/shell/environment/dsl.haml
... ... @@ -1,107 +0,0 @@
1   -.breadcrumbs
2   - %a{ :href => "/" }
3   - Documentation
4   -  > 
5   - %a{ :href => "/modules/" }
6   - Modules
7   -  > 
8   - %a{ :href => "/modules/shell/" }
9   - Shell
10   -  > 
11   - %a{ :href => "/modules/shell/environment/" }
12   - environment
13   -  > 
14   - %a{ :href => "/modules/shell/environment/dsl/" }
15   - DSL API :: environment
16   - %hr
17   -
18   -%h1
19   - Module environment
20   -
21   -%h2 command_exists()
22   -%p Checks to see whether a command exists within the current environment and PATH
23   -%h4 Input Parameters
24   -%p First parameter is a command name.
25   -%h4 Stream Outputs
26   -%p None.
27   -%h4 Environmental effects
28   -%p none.
29   -%h4 return codes
30   -%p
31   - 0 if the command was found in the current environment
32   - 1 if the command was not found in the current environment
33   -%h4 failure scenarios
34   -%p Fails if no command name was given.
35   -%h4 usage examples
36   -%pre
37   - %code
38   - :preserve
39   - user$ command_exists adsf
40   - user$ echo $?
41   - 1
42   -
43   - user$ command_exists ls
44   - user$ echo $?
45   - 0
46   -%h2 is_a_function()
47   -%p Checks to see whether a named function exists within the current environment
48   -%h4 Input Parameters
49   -%p First parameter is a command name.
50   -%h4 Stream Outputs
51   -%p None.
52   -%h4 Environmental effects
53   -%p none.
54   -%h4 return codes
55   -%p
56   - 0 if the function exists
57   - 1 if the function does not exist
58   -%h4 failure scenarios
59   -%p Fails if no function name was given.
60   -%h4 usage examples
61   -%pre
62   - %code
63   - :preserve
64   - user$ is_a_function rvm
65   - user$ echo $?
66   - 0
67   -
68   - user$ is_a_function asdf
69   - user$ echo $?
70   - 1
71   -
72   - user$ is_a_function ls
73   - user$ echo $?
74   - 1
75   -%h2 shell_is_interactive()
76   -%p Checks if the currently running shell is interactive (user controlled).
77   -%h4 Input Parameters
78   -%p None.
79   -%h4 Stream Outputs
80   -%p None.
81   -%h4 Environmental effects
82   -%p none.
83   -%h4 return codes
84   -%p
85   - 0 if the shell is interactive (user controlled)
86   - 1 if the shell is not interactive
87   -%h4 failure scenarios
88   -%p None currently.
89   -%h4 usage examples
90   -%p
91   - user$ cat $HOME/test
92   - \!/usr/bin/env bdsm
93   -
94   - modules bdsm/environment # Load the environment module.
95   -%p
96   - if shell_is_interactive
97   - then
98   - echo "Shell is Interactive! "
99   - else
100   - echo "Shell is Not Interactive! "
101   - fi
102   -%p
103   - user$ "$HOME/test"
104   - Shell is Not Interactive!
105   -%p
106   - user$ source "$HOME/test"
107   - Shell is Interactive!
2  content/modules/shell/environment/dsl.yaml
... ... @@ -1,2 +0,0 @@
1   ----
2   -title: "DSL API :: environment"
332 content/modules/shell/extensions/dsl.haml
... ... @@ -1,332 +0,0 @@
1   -.breadcrumbs
2   - %a{ :href => "/" }
3   - Documentation
4   -  > 
5   - %a{ :href => "/modules/" }
6   - Modules
7   -  > 
8   - %a{ :href => "/modules/shell/" }
9   - Bash
10   -  > 
11   - %a{ :href => "/modules/shell/extensions/" }
12   - extensions
13   -  > 
14   - %a{ :href => "/modules/shell/extensions/dsl/" }
15   - DSL API :: extensions
16   - %hr
17   -
18   -%h1
19   - Module extensions
20   -
21   -%h2 extension_action()
22   -%p
23   - Load the environment for a given extension action and then call it.
24   - This is the main function for BDSM.
25   -%h4 Input Parameters
26   -%p One or more extension names.
27   -%h4 Stream Outputs
28   -%p None.
29   -%h4 Environmental effects
30   -%p
31   - The current extension's initialize file will be resourced into the current
32   - environment.
33   -%h4 Return Codes
34   -%p
35   - 0 for success
36   - 1 for failure
37   -%h4 Failure Scenarios
38   -%p
39   - Fails if no extension was given.
40   - Fails if no action was given.
41   -%h4 Usage Examples
42   -%pre
43   - %code
44   - :preserve
45   - $ cat $HOME/test
46   - #!/usr/bin/env bdsm
47   -
48   - modules bdsm/extensions
49   - extension_action ext list
50   -
51   - $ $HOME/test
52   - bash fossil git libevent nginx p7zip postgresql rails redis srv tig tmux zeromq zlib
53   -%h2 extensions_install()
54   -%p Installs the given extensions.
55   -%h4 Input Parameters
56   -%p One or more extension names.
57   -%h4 Stream Outputs
58   -%p None.
59   -%h4 Environmental effects
60   -%p
61   - The named extensions will be installed to the filesystem in the BDSM
62   - extensions directory.
63   -%h4 Return Codes
64   -%p 0 for success
65   -%h4 Failure Scenarios
66   -%p Fails if no extensions are passed in to install.
67   -%h4 Usage Examples
68   -%pre
69   - %code
70   - :preserve
71   - user$ extensions_install libevent tmux
72   -%h2 extension_reload()
73   -%p Reloads (re-sources) the current extension's DSL and initialization files.
74   -%h4 Input Parameters
75   -%p None.
76   -%h4 Stream Outputs
77   -%p None.
78   -%h4 Environmental effects
79   -%p
80   - The current extension's DSL and initialization files are re-sourced into the
81   - calling environment.
82   -%h4 Return Codes
83   -%p 0 for success
84   -%h4 Failure Scenarios
85   -%p No current failure scenarios.
86   -%h4 Usage Examples
87   -%pre
88   - %code
89   - :preserve
90   - user$ extension_reload
91   -%h2 extension_reinitialize()
92   -%p Reinitializes the current extension.
93   -%h4 Input Parameters
94   -%p None.
95   -%h4 Stream Outputs
96   -%p None.
97   -%h4 Environmental effects
98   -%p
99   - The current extension's initialize file will be resourced into the current
100   - environment.
101   -%h4 Return Codes
102   -%p 0 for success
103   -%h4 Failure Scenarios
104   -%p No failure scenarios currently.
105   -%h4 Usage Examples
106   -%pre
107   - %code
108   - :preserve
109   - user$ extension_reinitialize
110   -%h2 extension_version()
111   -%p Outputs the named extension's version
112   -%h4 Input Parameters
113   -%p First parameter must be the name of an extension.
114   -%h4 Stream Outputs
115   -%p The extension-version string for the named extension.
116   -%h4 Environmental effects
117   -%p None.
118   -%h4 Return Codes
119   -%p 0 for success
120   -%h4 Failure Scenarios
121   -%p Fails if the extension name is not given.
122   -%h4 Usage Examples
123   -%pre
124   - %code
125   - :preserve
126   - user$ extension_reinitialize
127   -%h2 extension_licence()
128   -%p Emits the extension's license file, if it exists.
129   -%h4 Input Parameters
130   -%p First parameter may optionally be an extension name.
131   -%h4 Stream Outputs
132   -%p If the extension has a LICENSE file then it wil be printed to STDOUT.
133   -%h4 Environmental effects
134   -%p None.
135   -%h4 Return Codes
136   -%p 0 for success.
137   -%h4 Failure Scenarios
138   -%p No failure scenarios currently exist.
139   -%h4 Usage Examples
140   -%pre
141   - %code
142   - :preserve
143   - $ cat $HOME/test
144   - !/usr/bin/env bash
145   - source "/usr/local/bdsm/modules/bash/core/initialize" # Load BDSM framework core.
146   - modules extensions
147   - extension_license postgresql
148   -
149   - $ $HOME/test
150   - Copyright (c) 2009-2011 Wayne E. Seguin
151   -
152   - Licensed under the Apache License, Version 2.0 (the \"License\");
153   - you may not use this file except in compliance with the License.
154   - You may obtain a copy of the License at
155   -
156   - http://www.apache.org/licenses/LICENSE-2.0
157   -
158   - Unless required by applicable law or agreed to in writing, software
159   - distributed under the License is distributed on an \"AS IS\" BASIS,
160   - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
161   - See the License for the specific language governing permissions and
162   - limitations under the License.
163   -%h2 extensions_installed()
164   -%p Lists the extensions installed on the currently running process's system.
165   -%h4 Input Parameters
166   -%p None.
167   -%h4 Stream Outputs
168   -%p
169   - The names of the currently installed non-core extensions are printed to the
170   - calling environment's STDOUT.
171   -%h4 Environmental effects
172   -%p None.
173   -%h4 Return Codes
174   -%p 0 for success.
175   -%h4 Failure Scenarios
176   -%p No failure scenarios currently.
177   -%h4 Usage Examples
178   -%pre
179   - %code
180   - :preserve
181   - $ cat $HOME/test
182   - #!/usr/bin/env bash
183   - source "/usr/local/bdsm/modules/bash/core/initialize" # Load BDSM framework core.
184   - modules extensions
185   - extensions_installed
186   -
187   - $ $HOME/test
188   - bash fossil git libevent nginx p7zip postgresql rails redis tig tmux zeromq zlib
189   -%h2 extensions_available()
190   -%p
191   - Lists the extensions available to install on the currently running process's
192   - system.
193   -%h4 Input Parameters
194   -%p None.
195   -%h4 Stream Outputs
196   -%p
197   - The names of the available to install non-core extensions are printed to the
198   - calling environment's STDOUT.
199   -%h4 Environmental effects
200   -%p None.
201   -%h4 Return Codes
202   -%p 0 for success.
203   -%h4 Failure Scenarios
204   -%p No failure scenarios currently.
205   -%h4 Usage Examples
206   -%pre
207   - %code
208   - :preserve
209   - $ cat $HOME/test
210   - #!/usr/bin/env bash
211   - source "/usr/local/bdsm/modules/bash/core/initialize" # Load BDSM framework core.
212   - modules extensions
213   - extensions_available
214   - $ $HOME/test
215   - ack androidsdk apache bash bcrypt cacti cmake ctags curl deploy erlang fossil freetype ghc ghostscript git god iconv imagemagick jpeg keepalived lcms libevent libpng libwmf libxml2 libxslt logrotate lua memcached mercurial mongodb monit mysql nginx node npm openpkg openssl p7zip passenger pcre perl postgresql r rails rainbows readline redis riak rsync rvm screen sphinx sqlite3 subversion system thin tiff tig tmux unicorn unrar zeromq zlib zsh
216   -%h2 extensions_in_development()
217   -%p Lists the extensions available in the development repository, if set.
218   -%h4 Input Parameters
219   -%p None.
220   -%h4 Stream Outputs
221   -%p
222   - The names of the available to install non-core development repository
223   - extensions are printed to the calling environment's STDOUT, if defined.
224   -%h4 Environmental effects
225   -%p None.
226   -%h4 Return Codes
227   -%p 0 for success.
228   -%h4 Failure Scenarios
229   -%p No failure scenarios currently.
230   -%h4 Usage Examples
231   -%pre
232   - %code
233   - :preserve
234   - $ cat $HOME/test
235   - #!/usr/bin/env bash
236   - source "/usr/local/bdsm/modules/bash/core/initialize" # Load BDSM framework core.
237   - modules extensions
238   - extensions_in_development
239   - $ $HOME/test
240   - ack androidsdk apache bash bcrypt cacti cmake ctags curl deploy erlang fossil freetype ghc ghostscript git god iconv imagemagick jpeg keepalived lcms libevent libpng libwmf libxml2 libxslt logrotate lua memcached mercurial mongodb monit mysql nginx node npm openpkg openssl p7zip passenger pcre perl postgresql r rails rainbows readline redis riak rsync rvm screen sphinx sqlite3 subversion system thin tiff tig tmux unicorn unrar zeromq zlib zsh
241   -%h2 extensions_in()
242   -%p Lists the extensions in a given directory.
243   -%h4 Input Parameters
244   -%p
245   - First parameter is a full path a BDSM extensions directory.
246   - (example: /usr/local/bdsm/extensions)
247   -%h4 Stream Outputs
248   -%p
249   - The names of the extensions in the given directory are printed to the
250   - calling environment's STDOUT.
251   -%h4 Environmental effects
252   -%p None.
253   -%h4 Return Codes
254   -%p 0 for success.
255   -%h4 Failure Scenarios
256   -%p No failure scenarios currently.
257   -%h4 Usage Examples
258   -%pre
259   - %code
260   - :preserve
261   - $ cat $HOME/test
262   - #!/usr/bin/env bash
263   - source "/usr/local/bdsm/modules/bash/core/initialize" # Load BDSM framework core.
264   - modules extensions
265   - extensions_in /usr/local/bdsm/extensions
266   -
267   - $ $HOME/test
268   - bash fossil git libevent nginx p7zip postgresql rails redis tig tmux zeromq zlib
269   -%h2 extension_actions()
270   -%p Lists actions exposed by the named extension.
271   -%h4 Input Parameters
272   -%p First parameter is the name of the extension to list actions for.
273   -%h4 Stream Outputs
274   -%p
275   - The names of the extensions in the given directory are printed to the
276   - calling environment's STDOUT.
277   -%h4 Environmental effects
278   -%p None.
279   -%h4 Return Codes
280   -%p 0 for success.
281   -%h4 Failure Scenarios
282   -%p Fails if no extension name is given.
283   -%h4 Usage Examples
284   -%pre
285   - %code
286   - :preserve
287   - $ cat $HOME/test
288   - #!/usr/bin/env bash
289   - source "/usr/local/bdsm/modules/bash/core/initialize" # Load BDSM framework core.
290   - modules extensions
291   - extension_actions "postgresql"
292   -
293   - $ $HOME/test
294   - backup configure help initialize install restart start status stop uninstall upgrade
295   -%h2 extension_is_installed()
296   -%p Tests if a given extension is installed.
297   -%h4 Input Parameters
298   -%p First parameter is an extension name.
299   -%h4 Stream Outputs
300   -%p None.
301   -%h4 Environmental effects
302   -%p None.
303   -%h4 Return Codes
304   -%p
305   - 0 if the extension is installed.
306   - 1 if the extension is not installed.
307   -%h4 Failure Scenarios
308   -%p Fails if no extension name is given.
309   -%h4 Usage Examples
310   -%pre
311   - %code
312   - :preserve
313   - $ cat $HOME/test
314   - #!/usr/bin/env bash
315   - source "/usr/local/bdsm/modules/bash/core/initialize" # Load BDSM framework core.
316   - modules extensions
317   - extensions_installed
318   - echo
319   - for extension in postgresql asdf
320   - do
321   - if extension_is_installed "${extension}"
322   - then
323   - echo "${extension} is installed! "
324   - else
325   - echo "${extension} is NOT installed! "
326   - fi
327   - done
328   -
329   - $ $HOME/test
330   - bash fossil git libevent mysql nginx node npm p7zip postgresql rails redis tig tmux zeromq zlib
331   - postgresql is installed!
332   - asdf is NOT installed!
2  content/modules/shell/extensions/dsl.yaml
... ... @@ -1,2 +0,0 @@
1   ----
2   -title: "DSL API :: extensions"
893 content/modules/shell/filesystem/dsl.haml
... ... @@ -1,893 +0,0 @@
1   -.breadcrumbs
2   - %a{ :href => "/" }
3   - Documentation
4   -  > 
5   - %a{ :href => "/modules/" }
6   - Modules
7   -  > 
8   - %a{ :href => "/modules/shell/" }
9   - Bash
10   -  > 
11   - %a{ :href => "/modules/shell/filesystem/" }
12   - filesystem
13   -  > 
14   - %a{ :href => "/modules/shell/filesystem/dsl/" }
15   - DSL API :: filesystem
16   - %hr
17   -
18   -%h1
19   - Module filesystem
20   -
21   -%h1 source_files
22   -%p Safely source files only if they exists and are nonempty.
23   -%h4 Input Parameters
24   -%p One or more files.
25   -%h4 Stream Outputs
26   -%p None.
27   -%h4 Environmental effects
28   -%p Nonempty files given will be sourced into the calling environment.
29   -%h4 Return Codes
30   -%p 0 for success
31   -%h4 Failure Scenarios
32   -%p Fails if no files are given to sources.
33   -%h4 Usage Examples
34   -%pre
35   - %code
36   - :preserve
37   - user$ source_files "$HOME/.dotfiles/scripts/functions"
38   -%h1 nonempty_files
39   -%p Outputs a subset of the named files that are nonempty.
40   -%h4 Input Parameters
41   -%p One or more files.
42   -%h4 Stream Outputs
43   -%p
44   - Each nonempty filename parameter will be printed to STDOUT of the calling
45   - environment.
46   -%h4 Environmental effects
47   -%p None.
48   -%h4 Return Codes
49   -%p 0 for success
50   -%h4 Failure Scenarios
51   -%p Fails if no file names are given as arguments.
52   -%h4 Usage Examples
53   -%pre
54   - %code
55   - :preserve
56   - user$ nonempty_files a $HOME/.bdmsrc c
57   - /Users/wayneeseguin/.bdsmrc
58   -%h1 ensure_paths_exist
59   -%p
60   - Iterates over the list of given paths, creates the directory if it
61   - does not exist.
62   -%h4 Input Parameters
63   -%p A list of paths to create if missing.
64   -%h4 Stream Outputs
65   -%p None.
66   -%h4 Environmental effects
67   -%p Paths that were given but do not exist will be created.
68   -%h4 Return Codes
69   -%p 0 for success
70   -%h4 Failure Scenarios
71   -%p Fails if no paths were given to.
72   -%h4 Usage Examples
73   -%pre
74   - %code
75   - :preserve
76   - user$ ls -a
77   - . ..
78   - user$ ensure_paths_exist a b c
79   - user$ ls -a
80   - . .. a b c
81   -%h1 remove_files
82   -%p Removes the given files, if they exist.
83   -%h4 Input Parameters
84   -%p One or more file names/paths.
85   -%h4 Stream Outputs
86   -%p None.
87   -%h4 Environmental effects
88   -%p
89   - The named files will no longer exist on the system, if they existed to begin
90   - with.
91   -%h4 Return Codes
92   -%p 0 for success
93   -%h4 Failure Scenarios
94   -%p
95   - Fails if no files were named.
96   - Fails if a named file is a directory.
97   - Fails if a named file exists but is not a file.
98   -%h4 Usage Examples
99   -%pre
100   - %code
101   - :preserve
102   - user$ touch a b c
103   - user$ ls -a
104   - . .. a b c
105   - user$ remove_files a b c
106   - user$ ls
107   - . ..
108   -%h1 remove_paths
109   -%p Function Description
110   -%h4 Input Parameters
111   -%p Positional Parameter listing and descriptions.
112   -%h4 Stream Outputs
113   -%p What gets printed to STDOUT and STDERROR. 'None.' if nothing is output.
114   -%h4 Environmental effects
115   -%p What, if any, environmental side effects this function causes. 'None.' for none.
116   -%h4 Return Codes
117   -%p
118   - 0 if ...
119   - 1 if ...
120   -%h4 Failure Scenarios
121   -%p Fails if ...
122   -%h4 Usage Examples
123   -%pre
124   - %code
125   - :preserve
126   - user$ {{ setup the scenario }}
127   - user$ function_name {{ parameters }}
128   - user$ {{ demonstrate the results}}
129   -%h1 ensure_files_exist
130   -%p
131   - Iterates over the list of given files, creates the directory if it
132   - does not exist.
133   -%h4 Input Parameters
134   -%p A list of files to create if missing.
135   -%h4 Stream Outputs
136   -%p None.
137   -%h4 Environmental effects