Use in cryptest-cmake.sh test

pull/723/head
Jeffrey Walton 2018-09-10 09:00:25 -04:00
parent fc5a73186f
commit d0946abb0b
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 14 additions and 3 deletions

View File

@ -1,5 +1,11 @@
#!/usr/bin/env bash
PWD_DIR=$(pwd)
function cleanup {
cd "$PWD_DIR"
}
trap cleanup EXIT
GREP=grep
SED=sed
AWK=awk
@ -119,7 +125,7 @@ if ! ./configure; then
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
make clean 2>/dev/null
"$MAKE" clean 2>/dev/null
if ! "$MAKE" -j2 -f Makefile; then
echo "make failed."

View File

@ -6,6 +6,11 @@ function cleanup {
}
trap cleanup EXIT
# Fixup for Solaris and BSDs
if [[ ! -z $(command -v gmake) ]]; then
MAKE=gmake
fi
# Feth the three required files
if ! wget --no-check-certificate https://raw.githubusercontent.com/noloader/cryptopp-cmake/master/CMakeLists.txt -O CMakeLists.txt; then
echo "CMakeLists.txt download failed"
@ -28,9 +33,9 @@ if ! cmake ../; then
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
make clean 2>/dev/null
"$MAKE" clean 2>/dev/null
if ! make -j2 -f Makefile VERBOSE=1; then
if ! "$MAKE" -j2 -f Makefile VERBOSE=1; then
echo "make failed"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi