8000 Set installer tmp path to env var by lucasjrt · Pull Request #2730 · arduino/arduino-cli · GitHub
[go: up one dir, main page]

Skip to content

Set installer tmp path to env var #2730

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Set installer tmp path to env var
  • Loading branch information
lucasjrt committed Oct 14, 2024
commit a01d53d5ce5198879863f5544374cbb154a413a2
5 changes: 3 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ PROJECT_NAME="arduino-cli"
# BINDIR represents the local bin location, defaults to ./bin.
EFFECTIVE_BINDIR=""
DEFAULT_BINDIR="$PWD/bin"
TEMPDIR="${TMPDIR:-${TEMP:-${TMP:-/tmp}}}"

fail() {
echo "$1"
Expand Down Expand Up @@ -137,7 +138,7 @@ downloadFile() {
esac
DOWNLOAD_URL="${DOWNLOAD_URL_PREFIX}${APPLICATION_DIST}"

INSTALLATION_TMP_FILE="/tmp/$APPLICATION_DIST"
INSTALLATION_TMP_FILE="${TEMPDIR}/$APPLICATION_DIST"
echo "Downloading $DOWNLOAD_URL"
httpStatusCode=$(getFile "$DOWNLOAD_URL" "$INSTALLATION_TMP_FILE")
if [ "$httpStatusCode" -ne 200 ]; then
Expand Down Expand Up @@ -186,7 +187,7 @@ downloadFile() {
}

installFile() {
INSTALLATION_TMP_DIR="/tmp/$PROJECT_NAME"
INSTALLATION_TMP_DIR="${TEMPDIR}/$PROJECT_NAME"
mkdir -p "$INSTALLATION_TMP_DIR"
if [ "$OS" = "Windows" ]; then
unzip -d "$INSTALLATION_TMP_DIR" "$INSTALLATION_TMP_FILE"
Expand Down
0