diff --git a/rodeo-overlay.sh b/rodeo-overlay.sh index f42be6c..18cc8f1 100755 --- a/rodeo-overlay.sh +++ b/rodeo-overlay.sh @@ -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"