fix?
This commit is contained in:
parent
0c82e285a3
commit
58a3d7b2c1
1 changed files with 3 additions and 13 deletions
|
@ -27,23 +27,13 @@ warning() {
|
|||
echo "Warning: $1"
|
||||
}
|
||||
|
||||
beginswith() { case $2 in "$1"*) true;; *) false;; esac; }
|
||||
|
||||
endswith() { case $2 in *"$1") true;; *) false;; esac; }
|
||||
|
||||
stripped() {
|
||||
string="$1"
|
||||
string2=${string#"("}
|
||||
string2=${string2%")"}
|
||||
echo string2
|
||||
}
|
||||
|
||||
get_lower_dirs() {
|
||||
overlay_config="$1"
|
||||
dir="$2"
|
||||
while IFS="" read -r overlay || [ -n "$overlay" ]
|
||||
do
|
||||
if beginswith "(" "$overlay" && endswith ")" "$overlay" && [ -f "$(stripped "$overlay")" ]; then
|
||||
get_lower_dirs "$(stripped "$overlay")" "$dir"
|
||||
if [ -f "$overlay" ]; then
|
||||
get_lower_dirs "$overlay" "$dir"
|
||||
else
|
||||
debug "Checking if $overlay has $dir"
|
||||
cd $OVERLAY_DIRECTORY || fatal "Failed to change directory"
|
||||
|
|
Loading…
Add table
Reference in a new issue