sernatur/script/linux_bundler.sh

16 lines
509 B
Bash
Raw Normal View History

2018-10-18 16:31:50 -03:00
#!/bin/sh -eu
2018-11-01 21:52:30 -03:00
libdir="${MESON_INSTALL_DESTDIR_PREFIX}/lib"
2018-10-18 16:31:50 -03:00
mkdir -p $libdir
2018-11-01 21:52:30 -03:00
#libfile=`ldd ${MESON_INSTALL_DESTDIR_PREFIX}/bin/sernatur | grep libpq | cut -d ' ' -f 3`
#cp $libfile "${libdir}"
#strip "${libdir}/libpq"*
if [ -f "${MESON_INSTALL_DESTDIR_PREFIX}"/bin/sernatur ]; then
echo "Copying linked dynamic libs..."
ldd "${MESON_INSTALL_DESTDIR_PREFIX}"/bin/sernatur | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -v '{}' "${libdir}"
fi
echo "Stripping libs..."
strip --strip-debug "${libdir}/"*