Skip to content

Commit ad2c530

Browse files
committed
[scripts] Add echo tracing output
1 parent a93c30f commit ad2c530

File tree

5 files changed

+20
-1
lines changed

5 files changed

+20
-1
lines changed

scripts/autorun.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
set -e
33

44
cd "$(dirname ${BASH_SOURCE[0]})"
5+
source config.sh
56

67
./prepare.sh
78
./fetch.sh

scripts/build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ source config.sh
77
cd "$JDKDIR"
88

99
JAVA_VERSION="$(hg log -r "." --template "{latesttag}\n" | sed 's/jdk-//')-ev3"
10+
echo "[BUILD] Java version string: $JAVA_VERSION"
1011

1112
# refresh patched build system
13+
echo "[BUILD] Regenerating autoconf"
1214
bash "$AUTOGEN_PATH"
1315

1416
## Description ##
@@ -30,6 +32,7 @@ bash "$AUTOGEN_PATH"
3032
# BUILD_NM="gcc-nm"
3133

3234
# configure the build
35+
echo "[BUILD] Configuring Java"
3336
bash ./configure --with-boot-jdk="$HOSTJDK" \
3437
--openjdk-target=arm-linux-gnueabi \
3538
--with-abi-profile=arm-ev3 \
@@ -46,4 +49,5 @@ bash ./configure --with-boot-jdk="$HOSTJDK" \
4649
BUILD_NM="gcc-nm"
4750

4851
# start the build
52+
echo "[BUILD] Building Java"
4953
make clean images

scripts/fetch.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,22 @@ source config.sh
77
if [ ! -d "$JDKDIR" ]; then
88

99
# clone the root project
10+
echo "[FETCH] Cloning Java repo"
1011
hg clone "$JAVA_REPO" "$JDKDIR"
1112

1213
# enter the jdk repo
1314
cd "$JDKDIR"
1415

1516
# clone the rest of the tree, if needed
1617
if [ -f "./get_source.sh" ]; then
18+
echo "[FETCH] Downloading Java components"
1719
bash ./get_source.sh
1820
fi
1921

2022
# apply the EV3-specific patches
23+
echo "[FETCH] Patching the source tree"
2124
patch -p1 -i "$SCRIPTDIR/$PATCHVER.patch"
2225

2326
else
24-
echo "Directory for JDK repository exists, assuming everything has been done already." 2>&1
27+
echo "[FETCH] Directory for JDK repository exists, assuming everything has been done already." 2>&1
2528
fi

scripts/prepare.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ source config.sh
66

77
if [ ! -d "HOSTJDK" ]; then
88
if [ ! -e "$HOSTJDK_FILE" ]; then
9+
echo "[PREPARE] Downloading host JDK"
910
wget "$HOSTJDK_URL" -O "$HOSTJDK_FILE"
11+
else
12+
echo "[PREPARE] Using cached host JDK archive"
1013
fi
14+
echo "[PREPARE] Unpacking host JDK"
1115
tar -xf "$HOSTJDK_FILE" -C "$(dirname "$HOSTJDK")"
16+
else
17+
echo "[PREPARE] Using cached host JDK directory"
1218
fi

scripts/zip.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ source config.sh
88
cd "$IMAGEDIR"
99

1010
# clean destinations
11+
echo "[ZIP] Cleaning JRI images"
1112
rm -rf ./jri-ev3
1213

1314
# build ev3 runtime image
15+
echo "[ZIP] Building JRI"
1416
"$HOSTJDK/bin/jlink" \
1517
--module-path ./jmods/ \
1618
--endian little \
@@ -22,6 +24,9 @@ rm -rf ./jri-ev3
2224
--output ./jri-ev3
2325

2426
# create zip files
27+
echo "[ZIP] Creating JRI archive"
2528
tar -cf - jri-ev3 | pigz -9 > "$BUILDDIR/jri-ev3.tar.gz"
29+
echo "[ZIP] Creating JDK archive"
2630
tar -cf - jdk | pigz -9 > "$BUILDDIR/jdk-ev3.tar.gz"
31+
echo "[ZIP] Cleaning jmods archive"
2732
tar -cf - jmods | pigz -9 > "$BUILDDIR/jmods.tar.gz"

0 commit comments

Comments
 (0)