From 3b92255b8b599f753edcf6dbf9d7a177f5adf2a8 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sun, 1 Jul 2018 21:45:01 -0400 Subject: [PATCH] Add recipe to trim trailing whitespace --- TestScripts/cryptest-autotools.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/TestScripts/cryptest-autotools.sh b/TestScripts/cryptest-autotools.sh index f4482842..566471e8 100755 --- a/TestScripts/cryptest-autotools.sh +++ b/TestScripts/cryptest-autotools.sh @@ -16,10 +16,21 @@ if ! wget --no-check-certificate https://raw.githubusercontent.com/noloader/cryp [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 fi +# Convert as necessary if [[ ! -z $(command -v dos2unix) ]]; then dos2unix Makefile.am configure.ac libcryptopp.pc.in fi +# Trim trailing whitespace +if [[ ! -z $(command -v sed) ]]; then + sed -e's/[[:space:]]*$//' Makefile.am > Makefile.am.fixed + sed -e's/[[:space:]]*$//' configure.ac > configure.ac.fixed + sed -e's/[[:space:]]*$//' libcryptopp.pc.in > libcryptopp.pc.in.fixed + mv Makefile.am.fixed Makefile.am + mv configure.ac.fixed configure.ac + mv libcryptopp.pc.in.fixed libcryptopp.pc.in +fi + if ! autoreconf --force --install --warnings=all; then echo "autoreconf failed" [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1