Skip to content

Commit 2b28255

Browse files
committed
Simplify autogen
The autogen script is doing too many things. The tests that are set up in the git hooks are already tested by GitHub with actions on branch push. Also they don't work if you install wolfSSL somewhere specific. All one needs to do is run `autoreconf -ivf` to make the configure script. This is all autogen does now, with the addition of warnings.
1 parent a2ed75e commit 2b28255

3 files changed

Lines changed: 1 addition & 121 deletions

File tree

autogen.sh

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,8 @@
22
#
33
# Create configure and makefile stuff...
44

5-
# Check environment
6-
if [ -n "$WSL_DISTRO_NAME" ]; then
7-
# we found a non-blank WSL environment distro name
8-
current_path="$(pwd)"
9-
pattern="/mnt/?"
10-
if [ "$(echo "$current_path" | grep -E "^$pattern")" ]; then
11-
# if we are in WSL and shared Windows file system, 'ln' does not work.
12-
no_links=true
13-
else
14-
no_links=
15-
fi
16-
fi
17-
18-
# Git hooks should come before autoreconf.
19-
if [ -d .git ]; then
20-
if [ ! -d .git/hooks ]; then
21-
mkdir .git/hooks || exit $?
22-
fi
23-
24-
if [ -n "$no_links" ]; then
25-
echo "Linux ln does not work on shared Windows file system in WSL."
26-
if [ ! -e .git/hooks/pre-commit ]; then
27-
echo "The pre-commit.sh file will not be copied to .git/hooks/pre-commit"
28-
# shell scripts do not work on Windows; TODO create equivalent batch file
29-
# cp ./pre-commit.sh .git/hooks/pre-commit || exit $?
30-
fi
31-
# unlike wolfssl, wolfssh is not using pre-push.sh at this time. Enable as needed:
32-
# if [ ! -e .git/hooks/pre-push ]; then
33-
# echo "The pre-push.sh file will not be copied to .git/hooks/pre-commit"
34-
# # shell scripts do not work on Windows; TODO create equivalent batch file
35-
# # cp ./pre-push.sh .git/hooks/pre-push || exit $?
36-
# fi
37-
else
38-
if [ ! -e .git/hooks/pre-commit ]; then
39-
ln -sf ../../scripts/pre-commit.sh .git/hooks/pre-commit || exit $?
40-
fi
41-
# unlike wolfssl, wolfssh is not using pre-push.sh at this time Enable as needed:
42-
# if [ ! -e .git/hooks/pre-push ]; then
43-
# ln -s ../../pre-push.sh .git/hooks/pre-push || exit $?
44-
# fi
45-
fi
46-
fi
47-
485
# If this is a source checkout then call autoreconf with error as well
49-
if test -e .git
50-
then
6+
if [ -e .git ]; then
517
WARNINGS="all,error"
528
else
539
WARNINGS="all"

scripts/commit-tests.sh

Lines changed: 0 additions & 42 deletions
This file was deleted.

scripts/pre-commit.sh

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)