container: finance: lib_plugins: allow path depth
- Allows plugins to function within subdirectories - Removes redundant arg checking
This commit is contained in:
@@ -86,13 +86,11 @@ function lib_plugins::__parse_args()
|
|||||||
|
|
||||||
[[ ! "$_arg" =~ (^repo${global_arg_delim_1}|^custom${global_arg_delim_1}) ]] && lib_utils::die_usage "$_usage"
|
[[ ! "$_arg" =~ (^repo${global_arg_delim_1}|^custom${global_arg_delim_1}) ]] && lib_utils::die_usage "$_usage"
|
||||||
|
|
||||||
local -r _key="${_arg%${global_arg_delim_1}*}"
|
local -r _key="${_arg%%${global_arg_delim_1}*}"
|
||||||
local -r _len="$((${#_key} + 1))"
|
local -r _len="$((${#_key} + 1))"
|
||||||
|
|
||||||
if [[ "$_key" =~ ^repo$|^custom$ ]]; then
|
local -r _arg_type="${_arg:${_len}}"
|
||||||
local -r _arg_type="${_arg:${_len}}"
|
[ -z "$_arg_type" ] && lib_utils::die_usage "$_usage"
|
||||||
[ -z "$_arg_type" ] && lib_utils::die_usage "$_usage"
|
|
||||||
fi
|
|
||||||
|
|
||||||
local _path
|
local _path
|
||||||
case "$_key" in
|
case "$_key" in
|
||||||
|
|||||||
Reference in New Issue
Block a user