Skip to content

Commit 53ee219

Browse files
committed
Removed duplicate slashes again
1 parent 01230b7 commit 53ee219

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
@@ -11,14 +11,15 @@ log() {
1111
echo "[setup-workspace] $1"
1212
}
1313

14-
# Normalize TMPDIR so it has no trailing slash
14+
# Normalize TMPDIR and compose paths without duplicate slashes
1515
TMPDIR="${TMPDIR:-/tmp}"
1616
TMPDIR="${TMPDIR%/}"
1717

1818
# Place downloaded tools outside the repository so it isn't filled with binaries
19-
DOWNLOAD_DIR="$TMPDIR/codenameone-tools"
20-
mkdir -p "$DOWNLOAD_DIR"
19+
# Strip any trailing slash again at the join to be extra safe.
20+
DOWNLOAD_DIR="${TMPDIR%/}/codenameone-tools"
2121
ENV_DIR="$DOWNLOAD_DIR/tools"
22+
mkdir -p "$DOWNLOAD_DIR"
2223
mkdir -p "$ENV_DIR"
2324
mkdir -p ../cn1-binaries
2425
CN1_BINARIES="$(cd ../cn1-binaries && pwd -P)"

0 commit comments

Comments
 (0)