Skip to content

Commit

Permalink
Feature Update: Enable user defined HOMEBREW_PREFIX in Linux
Browse files Browse the repository at this point in the history
This still defaults to HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew" when HOMEBREW_PREFIX is not set
  • Loading branch information
jobs-git authored Dec 27, 2024
1 parent a7705fd commit 2c91314
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,17 @@ then
else
UNAME_MACHINE="$(uname -m)"

# On Linux, this script installs to /home/linuxbrew/.linuxbrew only
# On Linux, this script installs to /home/linuxbrew/.linuxbrew only if HOMEBREW_PREFIX is not set.

HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew"

if [ -z "$HOMEBREW_PREFIX" ]; then

Check failure on line 177 in install.sh

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest)

Prefer [[ ]] over [ ] for tests in Bash/Ksh.

Check failure on line 177 in install.sh

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest)

Prefer putting braces around variable references even when not strictly required.
echo "HOMEBREW_PREFIX is not set. Installing to $HOMEBREW_PREFIX"

Check failure on line 178 in install.sh

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest)

Prefer putting braces around variable references even when not strictly required.
else
echo "HOMEBREW_PREFIX is set to: $HOMEBREW_PREFIX"

Check failure on line 180 in install.sh

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest)

Prefer putting braces around variable references even when not strictly required.
echo "Installing to $HOMEBREW_PREFIX"

Check failure on line 181 in install.sh

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest)

Prefer putting braces around variable references even when not strictly required.
fi

HOMEBREW_REPOSITORY="${HOMEBREW_PREFIX}/Homebrew"
HOMEBREW_CACHE="${HOME}/.cache/Homebrew"

Expand Down

0 comments on commit 2c91314

Please sign in to comment.