From 81ca352b2f8040cbff5ec55a30a4fdaf7ad81bf8 Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Fri, 15 Jan 2016 21:49:09 -0800 Subject: [PATCH] smarted mdb generation --- build.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index fb050d5d7..dfd616cb8 100755 --- a/build.sh +++ b/build.sh @@ -51,6 +51,9 @@ CleanFolder() echo "Removing vshost files" find $path -name "*.vshost.exe" -exec rm "{}" \; + echo "Removing dylib files" + find $path -name "*.dylib" -exec rm "{}" \; + if [ -d $path/NuGet ] ; then echo "Removing NuGet" rm -rf $path/NuGet @@ -119,7 +122,16 @@ CreateMdbs() { local path=$1 if [ $runtime = "dotnet" ] ; then - find $path \( -name "*.exe" -o -name "*.dll" \) -not -name "MediaInfo.dll" -not -name "sqlite3.dll" -exec tools/pdb2mdb/pdb2mdb.exe "{}" \; + local pdbFiles=( $(find $path -name "*.pdb") ) + for filename in "${pdbFiles[@]}" + do + if [ -e ${filename%.pdb}.dll ] ; then + tools/pdb2mdb/pdb2mdb.exe ${filename%.pdb}.dll + fi + if [ -e ${filename%.pdb}.exe ] ; then + tools/pdb2mdb/pdb2mdb.exe ${filename%.pdb}.exe + fi + done fi }