1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-05 15:09:08 +02:00
audacity/scripts/ci/macos/generate_dsym.sh
Dmitry Vedenko 4b2b3458e8 Fixes macOS packaging issues
* Help is installed to correct location
* dSYM file is ignored
* Fixes weird issue with Conan picking up libraries from dSYM
2021-06-25 10:17:39 -07:00

26 lines
658 B
Bash

#!/usr/bin/env bash
set -xe
function extractDSym()
{
local lib=$1
local libfile=$(basename $lib)
local libname="${libfile%.*}"
local targetdir=$2
local dsymfile=${targetdir}/${libname}.dSYM
if [[ -d "$dsymfile" ]]; then
echo "Skipping dSYM generation for $libfile: dSYM exists"
elif [[ ! -L "$lib" && "$lib" != "{}" && $lib != *"dSYM"* ]]; then
echo "Extracting dSYMs from $libfile to $dsymfile"
dsymutil "$lib" -o "$dsymfile"
fi
}
export -f extractDSym
mkdir -p "$CONAN_USER_HOME/dsyms"
find $CONAN_USER_HOME -name "*.dylib" | xargs -I {} bash -c "extractDSym \"{}\" \"$CONAN_USER_HOME/dsyms\""