Skip to content

Commit 8892375

Browse files
committed
Removed local declaration
1 parent 29ffc71 commit 8892375

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/setup-workspace.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ log() {
1010
}
1111

1212
# Normalize TMPDIR so it has no trailing slash
13-
# Place downloaded tools outside the repository so it isn't filled with binaries
1413
TMPDIR="${TMPDIR:-/tmp}"
1514
TMPDIR="${TMPDIR%/}"
15+
16+
# Place downloaded tools outside the repository so it isn't filled with binaries
1617
DOWNLOAD_DIR="$TMPDIR/codenameone-tools"
1718
mkdir -p "$DOWNLOAD_DIR"
1819
ENV_DIR="$DOWNLOAD_DIR/tools"
@@ -25,6 +26,7 @@ if [ -f "$ENV_DIR/env.sh" ]; then
2526
fi
2627

2728
JAVA_HOME="${JAVA_HOME:-}"
29+
JAVA_HOME_11="${JAVA_HOME_11:-}"
2830
JAVA_HOME_17="${JAVA_HOME_17:-}"
2931
MAVEN_HOME="${MAVEN_HOME:-}"
3032

@@ -109,14 +111,13 @@ fi
109111

110112
log "Ensuring Maven is available"
111113
if ! [ -x "${MAVEN_HOME:-}/bin/mvn" ]; then
112-
local mvn_archive="$DOWNLOAD_DIR/$(basename "$MAVEN_URL")"
114+
mvn_archive="$DOWNLOAD_DIR/$(basename "$MAVEN_URL")"
113115
if [ -f "$mvn_archive" ]; then
114116
log "Using cached Maven archive $(basename "$mvn_archive")"
115117
else
116118
log "Downloading Maven from $MAVEN_URL"
117119
curl -fL "$MAVEN_URL" -o "$mvn_archive"
118120
fi
119-
local mvn_top
120121
mvn_top=$(tar -tzf "$mvn_archive" 2>/dev/null | head -1 | cut -d/ -f1 || true)
121122
if [ -n "$mvn_top" ] && [ -d "$DOWNLOAD_DIR/$mvn_top" ]; then
122123
log "Maven already extracted at $DOWNLOAD_DIR/$mvn_top"

0 commit comments

Comments
 (0)