From 58a3d7b2c12e1aeb505e64e181eca9529608892d Mon Sep 17 00:00:00 2001 From: pauljako Date: Sun, 9 Feb 2025 12:49:58 +0100 Subject: [PATCH] fix? --- rodeo-overlay.sh | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) 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"