mirror of https://github.com/wolfSSL/wolfssl
Tabs -> spaces
This commit is contained in:
parent
4ddc975aca
commit
f1a93f524d
126
async-check.sh
126
async-check.sh
|
@ -16,74 +16,74 @@
|
||||||
ASYNC_REPO=https://github.com/wolfSSL/wolfAsyncCrypt.git
|
ASYNC_REPO=https://github.com/wolfSSL/wolfAsyncCrypt.git
|
||||||
|
|
||||||
function Usage() {
|
function Usage() {
|
||||||
printf '\n%s\n\n' "Usage: $0 [keep|clean|setup]"
|
printf '\n%s\n\n' "Usage: $0 [keep|clean|setup]"
|
||||||
printf '%s\n' "Where \"keep\" means keep (default off) async files around for inspection"
|
printf '%s\n' "Where \"keep\" means keep (default off) async files around for inspection"
|
||||||
printf '%s\n' "Where \"clean\" means only clean (default off) the async files"
|
printf '%s\n' "Where \"clean\" means only clean (default off) the async files"
|
||||||
printf '%s\n\n' "Where \"setup\" means only setup (default off) the async files"
|
printf '%s\n\n' "Where \"setup\" means only setup (default off) the async files"
|
||||||
printf '%s\n' "EXAMPLE:"
|
printf '%s\n' "EXAMPLE:"
|
||||||
printf '%s\n' "---------------------------------"
|
printf '%s\n' "---------------------------------"
|
||||||
printf '%s\n' "./async-check.sh keep"
|
printf '%s\n' "./async-check.sh keep"
|
||||||
printf '%s\n' "./async-check.sh clean"
|
printf '%s\n' "./async-check.sh clean"
|
||||||
printf '%s\n' "./async-check.sh setup"
|
printf '%s\n' "./async-check.sh setup"
|
||||||
printf '%s\n\n' "---------------------------------"
|
printf '%s\n\n' "---------------------------------"
|
||||||
}
|
}
|
||||||
|
|
||||||
function CleanUp() {
|
function CleanUp() {
|
||||||
unlink ./wolfcrypt/src/async.c
|
unlink ./wolfcrypt/src/async.c
|
||||||
unlink ./wolfssl/wolfcrypt/async.h
|
unlink ./wolfssl/wolfcrypt/async.h
|
||||||
unlink ./wolfcrypt/src/port/intel/quickassist.c
|
unlink ./wolfcrypt/src/port/intel/quickassist.c
|
||||||
unlink ./wolfcrypt/src/port/intel/quickassist_mem.c
|
unlink ./wolfcrypt/src/port/intel/quickassist_mem.c
|
||||||
unlink ./wolfcrypt/src/port/intel/README.md
|
unlink ./wolfcrypt/src/port/intel/README.md
|
||||||
unlink ./wolfssl/wolfcrypt/port/intel/quickassist.h
|
unlink ./wolfssl/wolfcrypt/port/intel/quickassist.h
|
||||||
unlink ./wolfssl/wolfcrypt/port/intel/quickassist_mem.h
|
unlink ./wolfssl/wolfcrypt/port/intel/quickassist_mem.h
|
||||||
unlink ./wolfcrypt/src/port/cavium/cavium_nitrox.c
|
unlink ./wolfcrypt/src/port/cavium/cavium_nitrox.c
|
||||||
unlink ./wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h
|
unlink ./wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h
|
||||||
unlink ./wolfcrypt/src/port/cavium/README.md
|
unlink ./wolfcrypt/src/port/cavium/README.md
|
||||||
|
|
||||||
rm -rf ./async
|
rm -rf ./async
|
||||||
|
|
||||||
# restore original README.md files
|
# restore original README.md files
|
||||||
git checkout -- wolfcrypt/src/port/cavium/README.md
|
git checkout -- wolfcrypt/src/port/cavium/README.md
|
||||||
git checkout -- wolfcrypt/src/port/intel/README.md
|
git checkout -- wolfcrypt/src/port/intel/README.md
|
||||||
}
|
}
|
||||||
|
|
||||||
function LinkFiles() {
|
function LinkFiles() {
|
||||||
# link files
|
# link files
|
||||||
ln -s -f ../../async/wolfcrypt/src/async.c ./wolfcrypt/src/async.c
|
ln -s -f ../../async/wolfcrypt/src/async.c ./wolfcrypt/src/async.c
|
||||||
ln -s -f ../../async/wolfssl/wolfcrypt/async.h ./wolfssl/wolfcrypt/async.h
|
ln -s -f ../../async/wolfssl/wolfcrypt/async.h ./wolfssl/wolfcrypt/async.h
|
||||||
ln -s -f ../../../../async/wolfcrypt/src/port/intel/quickassist.c ./wolfcrypt/src/port/intel/quickassist.c
|
ln -s -f ../../../../async/wolfcrypt/src/port/intel/quickassist.c ./wolfcrypt/src/port/intel/quickassist.c
|
||||||
ln -s -f ../../../../async/wolfcrypt/src/port/intel/quickassist_mem.c ./wolfcrypt/src/port/intel/quickassist_mem.c
|
ln -s -f ../../../../async/wolfcrypt/src/port/intel/quickassist_mem.c ./wolfcrypt/src/port/intel/quickassist_mem.c
|
||||||
ln -s -f ../../../../async/wolfcrypt/src/port/intel/README.md ./wolfcrypt/src/port/intel/README.md
|
ln -s -f ../../../../async/wolfcrypt/src/port/intel/README.md ./wolfcrypt/src/port/intel/README.md
|
||||||
ln -s -f ../../../../async/wolfssl/wolfcrypt/port/intel/quickassist.h ./wolfssl/wolfcrypt/port/intel/quickassist.h
|
ln -s -f ../../../../async/wolfssl/wolfcrypt/port/intel/quickassist.h ./wolfssl/wolfcrypt/port/intel/quickassist.h
|
||||||
ln -s -f ../../../../async/wolfssl/wolfcrypt/port/intel/quickassist_mem.h ./wolfssl/wolfcrypt/port/intel/quickassist_mem.h
|
ln -s -f ../../../../async/wolfssl/wolfcrypt/port/intel/quickassist_mem.h ./wolfssl/wolfcrypt/port/intel/quickassist_mem.h
|
||||||
ln -s -f ../../../../async/wolfcrypt/src/port/cavium/cavium_nitrox.c ./wolfcrypt/src/port/cavium/cavium_nitrox.c
|
ln -s -f ../../../../async/wolfcrypt/src/port/cavium/cavium_nitrox.c ./wolfcrypt/src/port/cavium/cavium_nitrox.c
|
||||||
ln -s -f ../../../../async/wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h ./wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h
|
ln -s -f ../../../../async/wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h ./wolfssl/wolfcrypt/port/cavium/cavium_nitrox.h
|
||||||
ln -s -f ../../../../async/wolfcrypt/src/port/cavium/README.md ./wolfcrypt/src/port/cavium/README.md
|
ln -s -f ../../../../async/wolfcrypt/src/port/cavium/README.md ./wolfcrypt/src/port/cavium/README.md
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$#" -gt 1 ]; then
|
if [ "$#" -gt 1 ]; then
|
||||||
Usage
|
Usage
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
KEEP=no
|
KEEP=no
|
||||||
ONLY_SETUP=no
|
ONLY_SETUP=no
|
||||||
|
|
||||||
case "x$1" in
|
case "x$1" in
|
||||||
"xkeep")
|
"xkeep")
|
||||||
KEEP=yes
|
KEEP=yes
|
||||||
;;
|
;;
|
||||||
"xclean")
|
"xclean")
|
||||||
CleanUp
|
CleanUp
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
"xsetup")
|
"xsetup")
|
||||||
ONLY_SETUP=yes
|
ONLY_SETUP=yes
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
Usage
|
Usage
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Fail on any error in script from now on
|
# Fail on any error in script from now on
|
||||||
|
@ -91,10 +91,10 @@ set -e
|
||||||
|
|
||||||
if [ -d ./async ];
|
if [ -d ./async ];
|
||||||
then
|
then
|
||||||
echo "\n\nUsing existing async repo\n\n"
|
echo "\n\nUsing existing async repo\n\n"
|
||||||
else
|
else
|
||||||
# make a clone of the wolfAsyncCrypt repository
|
# make a clone of the wolfAsyncCrypt repository
|
||||||
git clone --depth 1 $ASYNC_REPO async
|
git clone --depth 1 $ASYNC_REPO async
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# setup auto-conf
|
# setup auto-conf
|
||||||
|
@ -102,12 +102,12 @@ fi
|
||||||
LinkFiles
|
LinkFiles
|
||||||
if [ "x$ONLY_SETUP" == "xno" ];
|
if [ "x$ONLY_SETUP" == "xno" ];
|
||||||
then
|
then
|
||||||
./configure --enable-asynccrypt --enable-all
|
./configure --enable-asynccrypt --enable-all
|
||||||
make check
|
make check
|
||||||
# Clean up
|
# Clean up
|
||||||
if [ "x$KEEP" == "xno" ];
|
if [ "x$KEEP" == "xno" ];
|
||||||
then
|
then
|
||||||
CleanUp
|
CleanUp
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue