diff options
Diffstat (limited to 'scripts/msys2-mcode/GetStandaloneDeps.sh')
-rw-r--r-- | scripts/msys2-mcode/GetStandaloneDeps.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/msys2-mcode/GetStandaloneDeps.sh b/scripts/msys2-mcode/GetStandaloneDeps.sh new file mode 100644 index 000000000..a5720fc5a --- /dev/null +++ b/scripts/msys2-mcode/GetStandaloneDeps.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +GetMinGWLibraries() { + ldd "${MSYSTEM_PREFIX}/$1" | while IFS="" read -r dependency; do + fields=($dependency) + dep="${fields[2]}" + if [[ "$dep" == /"${MSYSTEM,,}"/* ]]; then + echo "$dep" + GetMinGWLibraries "${dep#"/${MSYSTEM,,}/"}" + fi + done +} + +for dep in $(GetMinGWLibraries "lib/libghdl-2_0_0_dev.dll"); do + echo "$dep" + cp "$dep" ./ +done |