|
2 | 2 | # |
3 | 3 | # Create configure and makefile stuff... |
4 | 4 |
|
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 | | - |
48 | 5 | # 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 |
51 | 7 | WARNINGS="all,error" |
52 | 8 | else |
53 | 9 | WARNINGS="all" |
|
0 commit comments