#!/bin/sh
 
 
if [ ! -d "./dep" ]; then
	mkdir ./dep
#else : then
#	rm -rf ./dep
#	mkdir ./dep
fi
	   
ldd ./upsSmartView | grep "/lib/x86_64-linux-gnu" |cut -d ">" -f 2|grep lib|cut -d "(" -f 1|xargs -n1 -I {}  echo cp {} dep >cp.sh
ldd sqldrivers/libqsqlite.so | grep "/lib/x86_64-linux-gnu" |cut -d ">" -f 2|grep lib|cut -d "(" -f 1|xargs -n1 -I {}  echo cp {} dep >>cp.sh
ldd platforms/libqxcb.so | grep "/lib/x86_64-linux-gnu" |cut -d ">" -f 2|grep lib|cut -d "(" -f 1|xargs -n1 -I {}  echo cp {} dep >>cp.sh
chmod +x cp.sh
./cp.sh
echo "ok"

