Skip to content
Open
Show file tree
Hide file tree
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
11 changes: 9 additions & 2 deletions apps/site/snippets/en/download/brew.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Download and install Homebrew
curl -o- https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | bash
# Download and install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# In lieu of restarting the shell:
${props.os === 'MAC' ?
'if [ -x /opt/homebrew/bin/brew ]; then eval "$(/opt/homebrew/bin/brew shellenv)"; fi' :
'if [ -x /home/linuxbrew/.linuxbrew/bin/brew ]; then eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"; fi'
}

# Download and install Node.js:
brew install node@${props.release.major}
export PATH="$(brew --prefix node@${props.release.major})/bin:$PATH"
8 changes: 6 additions & 2 deletions apps/site/snippets/en/download/fnm.bash
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Download and install fnm:
${props.os === 'WIN' ?
'winget install Schniz.fnm' :
'curl -o- https://fnm.vercel.app/install | bash'
props.os === 'MAC' ?
'curl -o- https://fnm.vercel.app/install | bash -s -- --force-no-brew' :
'curl -o- https://fnm.vercel.app/install | bash'
}

# In lieu of restarting the shell
${props.os === 'WIN' ?
'fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression' :
'export PATH="$HOME/.local/share/fnm:$PATH"\neval "$(fnm env)"'
props.os === 'MAC' ?
'export PATH="$HOME/Library/Application Support/fnm:$PATH"\neval "$(fnm env)"' :
'export PATH="$HOME/.local/share/fnm:$PATH"\neval "$(fnm env)"'
}

# Download and install Node.js:
Expand Down
2 changes: 1 addition & 1 deletion apps/site/snippets/en/download/zeroinstall.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Get 0install:
${props.os === 'WIN' ? 'winget install 0install' : 'curl -O https://get.0install.net/0install.sh && chmod +x 0install.sh\n./0install.sh\nexport PATH=$HOME/bin:$PATH'}
${props.os === 'WIN' ? 'winget install 0install' : 'curl -O https://get.0install.net/0install.sh && chmod +x 0install.sh\n./0install.sh install home\nexport PATH=$HOME/bin:$PATH'}

# Add Node.js and npm to PATH:
0install add node https://apps.0install.net/javascript/node.xml --version=${props.release.version}
Expand Down