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"
|
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() {
|
get_lower_dirs() {
|
||||||
overlay_config="$1"
|
overlay_config="$1"
|
||||||
|
dir="$2"
|
||||||
while IFS="" read -r overlay || [ -n "$overlay" ]
|
while IFS="" read -r overlay || [ -n "$overlay" ]
|
||||||
do
|
do
|
||||||
if beginswith "(" "$overlay" && endswith ")" "$overlay" && [ -f "$(stripped "$overlay")" ]; then
|
if [ -f "$overlay" ]; then
|
||||||
get_lower_dirs "$(stripped "$overlay")" "$dir"
|
get_lower_dirs "$overlay" "$dir"
|
||||||
else
|
else
|
||||||
debug "Checking if $overlay has $dir"
|
debug "Checking if $overlay has $dir"
|
||||||
cd $OVERLAY_DIRECTORY || fatal "Failed to change directory"
|
cd $OVERLAY_DIRECTORY || fatal "Failed to change directory"
|
||||||
|
|
Loading…
Add table
Reference in a new issue