From ac474ee5c0aafc45c303144f1618a45248b7a0d8 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Wed, 30 Oct 2024 21:45:56 +0900 Subject: [PATCH] fetch-missing-libs: fallback in debug libraries if non debug are not found --- net.retrodeck.retrodeck.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/net.retrodeck.retrodeck.yml b/net.retrodeck.retrodeck.yml index e7aee798..bd609cbc 100644 --- a/net.retrodeck.retrodeck.yml +++ b/net.retrodeck.retrodeck.yml @@ -678,20 +678,24 @@ modules: dest_dir="${FLATPAK_DEST}/lib" dest_debug_dir="${FLATPAK_DEST}/retrodeck/lib/debug" - mkdir -p "$dest_dir" "dest_debug_dir" + mkdir -p "$dest_dir" "$dest_debug_dir" copy_missing_libs() { local src=$1 - local dest=$2 + local src_debug=$2 + local dest=$3 for lib in $missing_libs; do if [[ -f "$src/$lib" ]]; then cp "$src/$lib" "$dest" echo "Copied \"$lib\" to \"$dest\"" + elif [[ -f "$src_debug/$lib.debug" ]]; then + cp "$src_debug/$lib.debug" "$dest" + echo "Copied debug version of \"$lib\" to \"$dest\"" fi done } - copy_missing_libs "$src_dir" "$dest_dir" + copy_missing_libs "$src_dir" "$src_debug_dir" "$dest_dir" copy_missing_libs "$src_debug_dir" "$dest_debug_dir" rm -rf "$src_dir"