Skip to content

Commit df66ca8

Browse files
authored
Update build.sh
1 parent ce1721b commit df66ca8

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

build.sh

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
#!/bin/bash
22

33
if ! [ -x "$(command -v python3)" ]; then
4-
echo "ERROR: python is not installed! Please install python first."
4+
echo "ERROR: python is not installed or not in PATH! Please install python first."
55
exit 1
66
fi
77

88
if ! [ -x "$(command -v git)" ]; then
9-
echo "ERROR: git is not installed! Please install git first."
9+
echo "ERROR: git is not installed or not in PATH! Please install git first."
10+
exit 1
11+
fi
12+
13+
if ! [ -x "$(command -v ninja)" ]; then
14+
echo "ERROR: ninja is not installed or not in PATH! Please install ninja first."
1015
exit 1
1116
fi
1217

1318
# Fixes building some components. See https://github.com/espressif/arduino-esp32/issues/10167
1419
export IDF_COMPONENT_OVERWRITE_MANAGED_COMPONENTS=1
1520

21+
CCACHE_ENABLE=1
22+
1623
export TARGET="all"
1724
BUILD_TYPE="all"
1825
SKIP_ENV=0
@@ -21,8 +28,9 @@ ARCHIVE_OUT=1
2128
DEPLOY_OUT=0
2229

2330
function print_help() {
24-
echo "Usage: build.sh [-s] [-A <arduino_branch>] [-I <idf_branch>] [-i <idf_commit>] [-c <path>] [-t <target>] [-b <build|menuconfig|reconfigure|idf-libs|copy-bootloader|mem-variant>] [config ...]"
31+
echo "Usage: build.sh [-s] [-n] [-A <arduino_branch>] [-I <idf_branch>] [-i <idf_commit>] [-c <path>] [-t <target>] [-b <build|menuconfig|reconfigure|idf-libs|copy-bootloader|mem-variant>] [config ...]"
2532
echo " -s Skip installing/updating of ESP-IDF and all components"
33+
echo " -n Disable ccache"
2634
echo " -A Set which branch of arduino-esp32 to be used for compilation"
2735
echo " -I Set which branch of ESP-IDF to be used for compilation"
2836
echo " -i Set which commit of ESP-IDF to be used for compilation"
@@ -38,6 +46,9 @@ while getopts ":A:I:i:c:t:b:sde" opt; do
3846
s )
3947
SKIP_ENV=1
4048
;;
49+
n )
50+
CCACHE_ENABLE=0
51+
;;
4152
e )
4253
ARCHIVE_OUT=1
4354
;;
@@ -78,6 +89,8 @@ done
7889
shift $((OPTIND -1))
7990
CONFIGS=$@
8091

92+
export IDF_CCACHE_ENABLE=$CCACHE_ENABLE
93+
8194
# Output the TARGET array
8295
echo "TARGET(s): ${TARGET[@]}"
8396

0 commit comments

Comments
 (0)