Skip to content

Commit 8960738

Browse files
committed
property to configure default resource directory
1 parent 54474ea commit 8960738

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ affects the bash completion
183183
* **SODA_PARAMETER_NAME_LENGTH** - The max length to format the parameter names in the help usage
184184
* **SODA_PARAMETER_NAMESPACE_LENGTH** - The max length to format the parameter namespace in the help
185185
usage
186+
* **SODA_DEFAULT_RESOURCE_DIR** - the default directory to search for resources (defaults to
187+
*resources*)
186188

187189
Remember that parameters are converted to upper case, so you can call `soda --log-file=path/to/file`
188190
and the *$LOG_FILE* variable will be set to that value.

config/soda/conventions.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@
2323

2424
SODA_NAMESPACE_DELIMITER=.
2525
SODA_TASK_BASH_COMPLETION_SUFFIX=_bash_completion
26+
SODA_DEFAULT_RESOURCE_DIR=resources

scripts/core.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ namespaces() {
296296

297297
# Returns a resource based on the current namespace.
298298
resource() {
299-
local folder="resources"
299+
local folder="$SODA_DEFAULT_RESOURCE_DIR"
300300
local filename=""
301301
if [[ $# == 1 ]]; then
302302
filename="$1"

0 commit comments

Comments
 (0)