You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
418 B
20 lines
418 B
#!/bin/bash
|
|
|
|
appdir=$1
|
|
|
|
if [ -z "$appdir" ]; then
|
|
echo "usage: $0 <appdir>"
|
|
exit 1
|
|
fi
|
|
|
|
function copylibs() {
|
|
DLLFILE=$1
|
|
echo "Checking: $DLLFILE"
|
|
ldd $DLLFILE | grep '/mingw64/bin' | awk '{print $1}' | uniq | while read line; do
|
|
cp -v /mingw64/bin/$line $appdir
|
|
done
|
|
}
|
|
|
|
find "$appdir" -type f -name '*.dll' | while read line; do
|
|
copylibs $line
|
|
done
|
|
|