mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-22 05:55:38 +00:00
fetch-missing-libs: fallback in debug libraries if non debug are not found
This commit is contained in:
parent
8201f12d70
commit
ac474ee5c0
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue