diff --git a/build-agent-files b/build-agent-files index 27d6a50f7ef23293d681e19d4ad8c2730c497e9d..8b9cd6376be4df062c547dd4ae4917b41d5eda2a 100755 --- a/build-agent-files +++ b/build-agent-files @@ -49,6 +49,22 @@ printf "====================\n" printf "\n" +# Check if wget have been build +if ! test -f "${PREFIX}/wget-"*"/src/wget"; then + printf "PLEASE USE build-wget BEFORE RUNNNING THIS SCRIPT!!\n" + printf "ABORTING !!!!!!!!!!!!!!!!!!!!!!!!\n" + exit 1 +fi + +# Sanity check, we do not want dynamic linked binaries on the package +ldd "${PREFIX}/wget-"*"/src/wget" &>/dev/null +if ! test $? -eq 1; then + printf "THE wget BINARY HAVE NOT BEEN COMPILED WITH STATIC LIBRARY!!\n" + printf "PLEASE, BUILD wget USIGN build-wget!!\n" + printf "ABORTING !!!!!!!!!!!!!!!!!!!!!!!!\n" + exit 1 +fi + # Make sure all repositories are ok printf "Updating git repositories...\n" for repo in "${GITBASEDIR}/client:client" "${GITBASEDIR}/coleta:coleta"; do @@ -172,6 +188,10 @@ printf "Copying bootstrap..." cp -a "${BOOTSTRAP}" "${AGENTDIR}"/ printf " done\n\n" +printf "Copying wget binary..." +cp -a "${PREFIX}/wget-"*"/src/wget" "${OUTDIR}/bin/" +printf " done\n\n" + rm -f "${EXCLUDEFILE}" printf "All done.\n"