fix: installs

- skip docker setup
- no sudo in stow
- brew variables
- ssh logs
- node 20->22
This commit is contained in:
2025-05-19 23:09:17 +03:00
parent 82aa058ef5
commit 11e2bc95a7
5 changed files with 34 additions and 9 deletions

View File

@@ -27,4 +27,6 @@ if [ -z "$SKIP_SSH_CONFIG" ]; then
cat $ssh_pub cat $ssh_pub
unset ssh_method ssh_target ssh_key ssh_pub unset ssh_method ssh_target ssh_key ssh_pub
else
echo "Skipping SSH configuration"
fi fi

View File

@@ -6,7 +6,15 @@
# #
if [[ "$OSTYPE" == "darwin"* ]]; then if [[ "$OSTYPE" == "darwin"* ]]; then
if [ -d "/opt/homebrew/bin" ]; then
export PATH="/opt/homebrew/bin:$PATH"
fi
export NONINTERACTIVE=1 export NONINTERACTIVE=1
export HOMEBREW_NO_ANALYTICS=1
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
export HOMEBREW_NO_ENV_HINTS=1
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_INSTALL_CLEANUP=1
if ! command -v brew &> /dev/null; then if ! command -v brew &> /dev/null; then
echo "Installing Homebrew..." echo "Installing Homebrew..."
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
@@ -14,11 +22,14 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
else else
echo "Homebrew is already installed." echo "Homebrew is already installed."
fi fi
brew update
brew --version brew --version
unset NONINTERACTIVE unset NONINTERACTIVE \
HOMEBREW_NO_ANALYTICS \
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK \
HOMEBREW_NO_ENV_HINTS \
HOMEBREW_NO_AUTO_UPDATE \
HOMEBREW_NO_INSTALL_CLEANUP
else else
echo "Skipping: Not macOS" echo "Skipping: Not macOS"
fi fi

View File

@@ -28,6 +28,6 @@ rm -f $HOME/.ssh/config
mkdir -p $HOME/.config mkdir -p $HOME/.config
mkdir -p $HOME/.ssh mkdir -p $HOME/.ssh
sudo stow --dir="$root_dir/files" --target="$HOME" home stow --dir="$root_dir/files" --target="$HOME" home
sudo stow --dir="$root_dir/files" --target="$HOME/.config" dot-config stow --dir="$root_dir/files" --target="$HOME/.config" dot-config
sudo stow --dir="$root_dir/files" --target="$HOME/.ssh" dot-ssh stow --dir="$root_dir/files" --target="$HOME/.ssh" dot-ssh

View File

@@ -15,9 +15,9 @@ if ! command -v "nvm" &>/dev/null; then
fi fi
nvm --version nvm --version
nvm alias default lts/iron nvm alias default lts/jod
nvm install lts/iron nvm install lts/jod
nvm use lts/iron nvm use lts/jod
echo "Node.js $(node --version)" echo "Node.js $(node --version)"

View File

@@ -11,6 +11,16 @@ if [[ -n "$WSL_DISTRO_NAME" ]]; then
export SKIP_DOCKER_CONFIG=1 export SKIP_DOCKER_CONFIG=1
fi fi
# skip if in CODESPACES
if [[ -n "$CODESPACES" ]]; then
export SKIP_DOCKER_CONFIG=1
fi
# skip on mac
if [[ "$OSTYPE" == "darwin"* ]]; then
export SKIP_DOCKER_CONFIG=1
fi
if [[ -z "$SKIP_DOCKER_CONFIG" ]]; then if [[ -z "$SKIP_DOCKER_CONFIG" ]]; then
if [[ "$OSTYPE" == "linux-gnu"* ]]; then if [[ "$OSTYPE" == "linux-gnu"* ]]; then
if ! command -v docker &> /dev/null; then if ! command -v docker &> /dev/null; then
@@ -43,4 +53,6 @@ if [[ -z "$SKIP_DOCKER_CONFIG" ]]; then
fi fi
fi fi
docker --version docker --version
else
echo "Skipping Docker configuration"
fi fi