Skip to content

Commit 14cb451

Browse files
committed
[scripts] make fetch script pass for already downloaded source
1 parent 802eeb2 commit 14cb451

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

scripts/fetch.sh

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,22 @@ set -e
44
cd "$(dirname ${BASH_SOURCE[0]})"
55
source config.sh
66

7-
# clone the root project
8-
hg clone "$JAVA_REPO" "$JDKDIR"
7+
if [ ! -d "$JDKDIR" ]; then
98

10-
# enter the jdk repo
11-
cd "$JDKDIR"
9+
# clone the root project
10+
hg clone "$JAVA_REPO" "$JDKDIR"
1211

13-
# clone the rest of the tree, if needed
14-
if [ -f "./get_source.sh" ]; then
15-
bash ./get_source.sh
16-
fi
12+
# enter the jdk repo
13+
cd "$JDKDIR"
14+
15+
# clone the rest of the tree, if needed
16+
if [ -f "./get_source.sh" ]; then
17+
bash ./get_source.sh
18+
fi
1719

18-
# apply the EV3-specific patches
19-
patch -p1 -i "$SCRIPTDIR/$PATCHVER.patch"
20+
# apply the EV3-specific patches
21+
patch -p1 -i "$SCRIPTDIR/$PATCHVER.patch"
2022

23+
else
24+
echo "Directory for JDK repository exists, assuming everything has been done already." 2>&1
25+
fi

0 commit comments

Comments
 (0)