finished actions => handlers refacto, small bux fix in maestro => Test maestro1 OK
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
# resolveConfigPath BASE PATH
|
||||
# Turn PATH into an absolute path; relative segments are resolved from BASE.
|
||||
resolveConfigPath() {
|
||||
_base=$1
|
||||
_path=$2
|
||||
|
||||
case "$_path" in
|
||||
/*)
|
||||
printf '%s\n' "$_path"
|
||||
;;
|
||||
*)
|
||||
_dir=$(dirname "$_path")
|
||||
_name=$(basename "$_path")
|
||||
if [ "$_dir" = . ]; then
|
||||
printf '%s\n' "$_base/$_name"
|
||||
else
|
||||
printf '%s\n' "$(cd "$_base/$_dir" && pwd)/$_name"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
Reference in New Issue
Block a user