sernatur/script/linux_bundler.sh

16 lines
509 B
Bash
Executable File

#!/bin/sh -eu
libdir="${MESON_INSTALL_DESTDIR_PREFIX}/lib"
mkdir -p $libdir
#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}/"*