Skip to content

Commit a0836d8

Browse files
committed
Enforced the freetype switches checks
1 parent 16ceb0f commit a0836d8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

sbin/prepareWorkspace.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ isFreeTypeInSources() {
7070
echo "No jdk sources exists to to determine $libfreetypeid presence"
7171
exit 1
7272
fi
73-
find "$location" | grep -q "$libfreetypeid"
74-
local found=$?
73+
local found=0
74+
find "$location" | grep -q "$libfreetypeid" || found=$?
7575
if [ $found -eq 0 ] ; then
7676
echo "$libfreetypeid found in $location"
7777
checkBundledFreetypeJdkConfig
@@ -138,7 +138,7 @@ unpackFromArchive() {
138138

139139
copyFromDirOrUnpackFromArchive() {
140140
echo "Cleaning the copy of OpenJDK source repository from $(pwd)/${BUILD_CONFIG[OPENJDK_SOURCE_DIR]} and replacing with a fresh copy in 10 seconds..."
141-
verboseSleep 10
141+
verboseSleep 1
142142
rm -rf "./${BUILD_CONFIG[OPENJDK_SOURCE_DIR]}"
143143
mkdir "./${BUILD_CONFIG[OPENJDK_SOURCE_DIR]}"
144144
# Note that we are not persisting the build directory
@@ -866,6 +866,8 @@ downloadBootJdkIfNeeded () {
866866

867867
# Download all of the dependencies for OpenJDK (Alsa, FreeType, boot-jdk etc.)
868868
downloadingRequiredDependencies() {
869+
local freeTypeInSources=0
870+
isFreeTypeInSources || freeTypeInSources="$?"
869871
if [[ "${BUILD_CONFIG[CLEAN_LIBS]}" == "true" ]]; then
870872
rm -rf "${BUILD_CONFIG[WORKSPACE_DIR]}/libs/freetype" || true
871873
rm -rf "${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}/installedalsa" || true
@@ -892,7 +894,7 @@ downloadingRequiredDependencies() {
892894
fi
893895

894896
if [[ "${BUILD_CONFIG[FREETYPE]}" == "true" ]]; then
895-
if ! isFreeTypeInSources ; then
897+
if [ "0${freeTypeInSources}" -ne 0 ] ; then
896898
if [ -z "${BUILD_CONFIG[FREETYPE_DIRECTORY]}" ]; then
897899
echo "Checking and download FreeType Font dependency"
898900
checkingAndDownloadingFreeType

0 commit comments

Comments
 (0)