Skip to content

Commit 29ffc71

Browse files
committed
Fixed tmpdir directory
1 parent 18e87f0 commit 29ffc71

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

scripts/build-android-port.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
set -euo pipefail
44

55
# Normalize TMPDIR so it has no trailing slash
6+
TMPDIR="${TMPDIR:-/tmp}"
67
TMPDIR="${TMPDIR%/}"
7-
DOWNLOAD_DIR="${TMPDIR:-/tmp}/codenameone-tools"
8+
DOWNLOAD_DIR="$TMPDIR/codenameone-tools"
89
ENV_DIR="$DOWNLOAD_DIR/tools"
910

1011
if [ -f "$ENV_DIR/env.sh" ]; then
@@ -18,10 +19,6 @@ if ! "${JAVA_HOME_11:-}/bin/java" -version 2>&1 | grep -q '11\.0'; then
1819
echo "Failed to provision JDK 11" >&2
1920
exit 1
2021
fi
21-
if ! "${JAVA_HOME_17:-}/bin/java" -version 2>&1 | grep -q '17\.0'; then
22-
./scripts/setup-workspace.sh -q -DskipTests
23-
source "$ROOT/tools/env.sh"
24-
fi
2522
if ! "${JAVA_HOME_17:-}/bin/java" -version 2>&1 | grep -q '17\.0'; then
2623
echo "Failed to provision JDK 17" >&2
2724
exit 1

scripts/build-ios-port.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ if ! command -v xcodebuild >/dev/null; then
1111
fi
1212

1313
# Normalize TMPDIR so it has no trailing slash
14+
TMPDIR="${TMPDIR:-/tmp}"
1415
TMPDIR="${TMPDIR%/}"
15-
DOWNLOAD_DIR="${TMPDIR:-/tmp}/codenameone-tools"
16+
DOWNLOAD_DIR="$TMPDIR/codenameone-tools"
1617
ENV_DIR="$DOWNLOAD_DIR/tools"
1718

1819
if [ -f "$ENV_DIR/env.sh" ]; then

scripts/setup-workspace.sh

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

1212
# Normalize TMPDIR so it has no trailing slash
13-
TMPDIR="${TMPDIR%/}"
14-
1513
# Place downloaded tools outside the repository so it isn't filled with binaries
16-
DOWNLOAD_DIR="${TMPDIR:-/tmp}/codenameone-tools"
14+
TMPDIR="${TMPDIR:-/tmp}"
15+
TMPDIR="${TMPDIR%/}"
16+
DOWNLOAD_DIR="$TMPDIR/codenameone-tools"
1717
mkdir -p "$DOWNLOAD_DIR"
1818
ENV_DIR="$DOWNLOAD_DIR/tools"
1919
mkdir -p "$ENV_DIR"

tools/env.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export JAVA_HOME="/var/folders/zk/c7v7vr9d4s98dkx18yc7by7c0000gn/T//codenameone-tools/jdk8u462-b08/Contents/Home"
2+
export JAVA_HOME_17="/var/folders/zk/c7v7vr9d4s98dkx18yc7by7c0000gn/T//codenameone-tools/jdk-17.0.16+8/Contents/Home"
3+
export MAVEN_HOME="/var/folders/zk/c7v7vr9d4s98dkx18yc7by7c0000gn/T//codenameone-tools/apache-maven-3.9.6"
4+
export PATH="$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH"

0 commit comments

Comments
 (0)