@ -41,62 +41,62 @@ else
readelf = readelf
fi
${ readelf } -d ${ executable } | grep NEEDED| awk '{ print $5 }' | sed 's/\[//g' | sed 's/\]//g' > " ${ root dir} /.depdetect_readelf "
${ readelf } -d ${ executable } | grep NEEDED| awk '{ print $5 }' | sed 's/\[//g' | sed 's/\]//g' > " ${ lgsm dir} /.depdetect_readelf "
echo "yum install " > " ${ root dir} /.depdetect_centos_list_uniq "
echo "apt-get install " > " ${ root dir} /.depdetect_ubuntu_list_uniq "
echo "apt-get install " > " ${ root dir} /.depdetect_debian_list_uniq "
echo "yum install " > " ${ lgsm dir} /.depdetect_centos_list_uniq "
echo "apt-get install " > " ${ lgsm dir} /.depdetect_ubuntu_list_uniq "
echo "apt-get install " > " ${ lgsm dir} /.depdetect_debian_list_uniq "
while read lib; do
sharedlib = ${ lib }
if [ " ${ lib } " = = "libm.so.6" ] || [ " ${ lib } " = = "libc.so.6" ] || [ " ${ lib } " = = "libpthread.so.0" ] || [ " ${ lib } " = = "libdl.so.2" ] || [ " ${ lib } " = = "libnsl.so.1" ] || [ " ${ lib } " = = "libgcc_s.so.1" ] || [ " ${ lib } " = = "librt.so.1" ] || [ " ${ lib } " = = "ld-linux.so.2" ] ; then
echo "glibc.i686" >> " ${ root dir} /.depdetect_centos_list "
echo "lib32gcc1" >> " ${ root dir} /.depdetect_ubuntu_list "
echo "lib32gcc1" >> " ${ root dir} /.depdetect_debian_list "
echo "glibc.i686" >> " ${ lgsm dir} /.depdetect_centos_list "
echo "lib32gcc1" >> " ${ lgsm dir} /.depdetect_ubuntu_list "
echo "lib32gcc1" >> " ${ lgsm dir} /.depdetect_debian_list "
elif [ " ${ lib } " = = "libstdc++.so.6" ] ; then
echo "libstdc++.i686" >> " ${ root dir} /.depdetect_centos_list "
echo "libstdc++6:i386" >> " ${ root dir} /.depdetect_ubuntu_list "
echo "libstdc++6:i386" >> " ${ root dir} /.depdetect_debian_list "
echo "libstdc++.i686" >> " ${ lgsm dir} /.depdetect_centos_list "
echo "libstdc++6:i386" >> " ${ lgsm dir} /.depdetect_ubuntu_list "
echo "libstdc++6:i386" >> " ${ lgsm dir} /.depdetect_debian_list "
elif [ " ${ lib } " = = "libstdc++.so.5" ] ; then
echo "compat-libstdc++-33.i686" >> " ${ root dir} /.depdetect_centos_list "
echo "libstdc++5:i386" >> " ${ root dir} /.depdetect_ubuntu_list "
echo "libstdc++5:i386" >> " ${ root dir} /.depdetect_debian_list "
echo "compat-libstdc++-33.i686" >> " ${ lgsm dir} /.depdetect_centos_list "
echo "libstdc++5:i386" >> " ${ lgsm dir} /.depdetect_ubuntu_list "
echo "libstdc++5:i386" >> " ${ lgsm dir} /.depdetect_debian_list "
elif [ " ${ lib } " = = "libspeex.so.1" ] || [ " ${ lib } " = = "libspeexdsp.so.1" ] ; then
echo "speex.i686" >> " ${ root dir} /.depdetect_centos_list "
echo "speex:i386" >> " ${ root dir} /.depdetect_ubuntu_list "
echo "speex:i386" >> " ${ root dir} /.depdetect_debian_list "
echo "speex.i686" >> " ${ lgsm dir} /.depdetect_centos_list "
echo "speex:i386" >> " ${ lgsm dir} /.depdetect_ubuntu_list "
echo "speex:i386" >> " ${ lgsm dir} /.depdetect_debian_list "
elif [ " ${ lib } " = = "./libSDL-1.2.so.0" ] || [ " ${ lib } " = = "libSDL-1.2.so.0" ] ; then
echo "SDL.i686" >> " ${ root dir} /.depdetect_centos_list "
echo "libsdl1.2debian" >> " ${ root dir} /.depdetect_ubuntu_list "
echo "libsdl1.2debian" >> " ${ root dir} /.depdetect_debian_list "
echo "SDL.i686" >> " ${ lgsm dir} /.depdetect_centos_list "
echo "libsdl1.2debian" >> " ${ lgsm dir} /.depdetect_ubuntu_list "
echo "libsdl1.2debian" >> " ${ lgsm dir} /.depdetect_debian_list "
elif [ " ${ lib } " = = "libtbb.so.2" ] ; then
echo "tbb.i686" >> " ${ root dir} /.depdetect_centos_list "
echo "libtbb2" >> " ${ root dir} /.depdetect_ubuntu_list "
echo "libtbb2" >> " ${ root dir} /.depdetect_debian_list "
echo "tbb.i686" >> " ${ lgsm dir} /.depdetect_centos_list "
echo "libtbb2" >> " ${ lgsm dir} /.depdetect_ubuntu_list "
echo "libtbb2" >> " ${ lgsm dir} /.depdetect_debian_list "
elif [ " ${ lib } " = = "libtier0.so" ] || [ " ${ lib } " = = "Core.so" ] || [ " ${ lib } " = = "Editor.so" ] || [ " ${ lib } " = = "Engine.so" ] || [ " ${ lib } " = = "liblua.so" ] || [ " ${ lib } " = = "libsteam_api.so" ] || [ " ${ lib } " = = "ld-linux-x86-64.so.2" ] || [ " ${ lib } " = = "libPhysX3_x86.so" ] || [ " ${ lib } " = = "libPhysX3Common_x86.so" ] || [ " ${ lib } " = = "libPhysX3Cooking_x86.so" ] ; then
# Known shared libs what dont requires dependencies
:
else
unknownlib = 1
echo " ${ lib } " >> " ${ root dir} /.depdetect_unknown "
echo " ${ lib } " >> " ${ lgsm dir} /.depdetect_unknown "
fi
done < " ${ root dir} /.depdetect_readelf "
sort " ${ root dir} /.depdetect_centos_list " | uniq >> " ${ root dir} /.depdetect_centos_list_uniq "
sort " ${ root dir} /.depdetect_ubuntu_list " | uniq >> " ${ root dir} /.depdetect_ubuntu_list_uniq "
sort " ${ root dir} /.depdetect_debian_list " | uniq >> " ${ root dir} /.depdetect_debian_list_uniq "
done < " ${ lgsm dir} /.depdetect_readelf "
sort " ${ lgsm dir} /.depdetect_centos_list " | uniq >> " ${ lgsm dir} /.depdetect_centos_list_uniq "
sort " ${ lgsm dir} /.depdetect_ubuntu_list " | uniq >> " ${ lgsm dir} /.depdetect_ubuntu_list_uniq "
sort " ${ lgsm dir} /.depdetect_debian_list " | uniq >> " ${ lgsm dir} /.depdetect_debian_list_uniq "
if [ " ${ unknownlib } " = = "1" ] ; then
sort " ${ root dir} /.depdetect_unknown " | uniq >> " ${ root dir} /.depdetect_unknown_uniq "
sort " ${ lgsm dir} /.depdetect_unknown " | uniq >> " ${ lgsm dir} /.depdetect_unknown_uniq "
fi
awk -vORS= ' ' '{ print $1, $2 }' " ${ root dir} /.depdetect_centos_list_uniq " > " ${ root dir} /.depdetect_centos_line "
awk -vORS= ' ' '{ print $1, $2 }' " ${ root dir} /.depdetect_ubuntu_list_uniq " > " ${ root dir} /.depdetect_ubuntu_line "
awk -vORS= ' ' '{ print $1, $2 }' " ${ root dir} /.depdetect_debian_list_uniq " > " ${ root dir} /.depdetect_debian_line "
awk -vORS= ' ' '{ print $1, $2 }' " ${ lgsm dir} /.depdetect_centos_list_uniq " > " ${ lgsm dir} /.depdetect_centos_line "
awk -vORS= ' ' '{ print $1, $2 }' " ${ lgsm dir} /.depdetect_ubuntu_list_uniq " > " ${ lgsm dir} /.depdetect_ubuntu_line "
awk -vORS= ' ' '{ print $1, $2 }' " ${ lgsm dir} /.depdetect_debian_list_uniq " > " ${ lgsm dir} /.depdetect_debian_line "
echo ""
echo "Required Dependencies"
@ -105,46 +105,46 @@ echo "${executable}"
echo ""
echo "CentOS"
echo "================================="
cat " ${ root dir} /.depdetect_centos_line "
cat " ${ lgsm dir} /.depdetect_centos_line "
echo ""
echo ""
echo "Ubuntu"
echo "================================="
cat " ${ root dir} /.depdetect_ubuntu_line "
cat " ${ lgsm dir} /.depdetect_ubuntu_line "
echo ""
echo ""
echo "Debian"
echo "================================="
cat " ${ root dir} /.depdetect_debian_line "
cat " ${ lgsm dir} /.depdetect_debian_line "
echo ""
if [ " ${ unknownlib } " = = "1" ] ; then
echo ""
echo "Unknown shared Library"
echo "================================="
cat " ${ root dir} /.depdetect_unknown "
cat " ${ lgsm dir} /.depdetect_unknown "
fi
echo ""
echo "Required Librarys"
echo "================================="
sort " ${ root dir} /.depdetect_readelf " | uniq
sort " ${ lgsm dir} /.depdetect_readelf " | uniq
echo ""
echo "ldd"
echo "================================="
ldd ${ executable }
echo -en "\n"
rm -f " ${ root dir} /.depdetect_centos_line "
rm -f " ${ root dir} /.depdetect_centos_list "
rm -f " ${ root dir} /.depdetect_centos_list_uniq "
rm -f " ${ lgsm dir} /.depdetect_centos_line "
rm -f " ${ lgsm dir} /.depdetect_centos_list "
rm -f " ${ lgsm dir} /.depdetect_centos_list_uniq "
rm -f " ${ root dir} /.depdetect_debian_line "
rm -f " ${ root dir} /.depdetect_debian_list "
rm -f " ${ root dir} /.depdetect_debian_list_uniq "
rm -f " ${ lgsm dir} /.depdetect_debian_line "
rm -f " ${ lgsm dir} /.depdetect_debian_list "
rm -f " ${ lgsm dir} /.depdetect_debian_list_uniq "
rm -f " ${ root dir} /.depdetect_ubuntu_line "
rm -f " ${ root dir} /.depdetect_ubuntu_list "
rm -f " ${ root dir} /.depdetect_ubuntu_list_uniq "
rm -f " ${ lgsm dir} /.depdetect_ubuntu_line "
rm -f " ${ lgsm dir} /.depdetect_ubuntu_list "
rm -f " ${ lgsm dir} /.depdetect_ubuntu_list_uniq "
rm -f " ${ root dir} /.depdetect_readelf "
rm -f " ${ lgsm dir} /.depdetect_readelf "
rm -f " ${ root dir} /.depdetect_unknown "
rm -f " ${ root dir} /.depdetect_unknown_uniq "
rm -f " ${ lgsm dir} /.depdetect_unknown "
rm -f " ${ lgsm dir} /.depdetect_unknown_uniq "