forked from armbian/build
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwp-compile.sh
executable file
·32 lines (26 loc) · 1.2 KB
/
wp-compile.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
./compile.sh $@
errors=$(grep -v -f .ignore-errors output/debug/wp-compile.log |
grep --color=always -A1 -iwn "error\|errors\|fail\|failure\|operation not permitted\|permission denied\|unable to locate\|could not connect to\|read-only file system\|connection refused\|fatal\|unable")
echo
if [ -n "$errors" ]; then
echo -e "\e[0;33m"
echo --------------------------------------------------------------
echo Those are possible failures in the build, please double check
echo --------------------------------------------------------------
echo -e "\x1B[0m"
echo "$errors"
echo
echo --------------------------------------------------------------
echo Compilation logs are available on output/debug/wp-compile.log
echo
echo If you want to ignore any errors, add the line to ignore
echo at file .ignore-errors
echo --------------------------------------------------------------
else
echo --------------------------------------------------------------
echo -e "[\e[0;32m Success! \x1B[0m] No obvious errors found while building"
echo
echo You can check compilation logs at output/debug/wp-compile.log
echo --------------------------------------------------------------
fi