Skip to content
Merged
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
3 changes: 0 additions & 3 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/usr/bin/env bash

# Set "strict mode"
set -euo pipefail

SCRIPT_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
if [[ -f "${SCRIPT_PATH}/shell/functions" ]]; then
source "${SCRIPT_PATH}/shell/functions"
Expand Down
24 changes: 18 additions & 6 deletions shell/functions
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# Set "strict mode"
set -euo pipefail
# set -euo pipefail

section_start() {
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' -
Expand Down Expand Up @@ -227,11 +227,23 @@ setup_arch_services() {
install_nvm() {
section_start 'Installing NVM'
# shellcheck disable=SC2155
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.config/nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" &&
mkdir -p "${NVM_DIR}" &&
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash

corepack enable
export NVM_DIR="$(
[ -z "${XDG_CONFIG_HOME-}" ]
printf %s "${HOME}/.config/nvm" || printf %s "${XDG_CONFIG_HOME}/nvm"
)"
mkdir -p "${NVM_DIR}"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash

# Load NVM after installing it.
[ -s "${NVM_DIR}/nvm.sh" ] && \."${NVM_DIR}/nvm.sh" # This loads nvm

nvm install --lts
nvm use --lts
nvm alias default node

if command -v corepack >/dev/null 2>&1; then
corepack enable
fi
}

install_rustup() {
Expand Down