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
18 changes: 18 additions & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: ShellCheck

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
shellcheck:
name: Run ShellCheck
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Run ShellCheck
run: shellcheck macos/*.sh linux/*.sh
9 changes: 6 additions & 3 deletions linux/install_tools_arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ if [ ! -d "$HOME/.nvm" ]; then

# Load NVM into current session
export NVM_DIR="$HOME/.nvm"
# shellcheck disable=SC1091
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# shellcheck disable=SC1091
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
else
echo "NVM is already installed."
export NVM_DIR="$HOME/.nvm"
# shellcheck disable=SC1091
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
fi

Expand Down Expand Up @@ -81,14 +84,14 @@ if ! command -v docker &> /dev/null; then
curl -sSL https://get.docker.com | sh

# Add current user to docker group
sudo usermod -aG docker $USER
sudo usermod -aG docker "$USER"
echo "Docker installed. You may need to log out and back in for group changes to take effect."
else
echo "Docker is already installed."
# Ensure user is in docker group
if ! groups $USER | grep -q '\bdocker\b'; then
if ! groups "$USER" | grep -q '\bdocker\b'; then
echo "Adding user to docker group..."
sudo usermod -aG docker $USER
sudo usermod -aG docker "$USER"
echo "You may need to log out and back in for group changes to take effect."
fi
fi
Expand Down
9 changes: 6 additions & 3 deletions linux/install_tools_x86.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ if [ ! -d "$HOME/.nvm" ]; then

# Load NVM into current session
export NVM_DIR="$HOME/.nvm"
# shellcheck disable=SC1091
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# shellcheck disable=SC1091
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
else
echo "NVM is already installed."
export NVM_DIR="$HOME/.nvm"
# shellcheck disable=SC1091
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
fi

Expand Down Expand Up @@ -81,14 +84,14 @@ if ! command -v docker &> /dev/null; then
curl -sSL https://get.docker.com | sh

# Add current user to docker group
sudo usermod -aG docker $USER
sudo usermod -aG docker "$USER"
echo "Docker installed. You may need to log out and back in for group changes to take effect."
else
echo "Docker is already installed."
# Ensure user is in docker group
if ! groups $USER | grep -q '\bdocker\b'; then
if ! groups "$USER" | grep -q '\bdocker\b'; then
echo "Adding user to docker group..."
sudo usermod -aG docker $USER
sudo usermod -aG docker "$USER"
echo "You may need to log out and back in for group changes to take effect."
fi
fi
Expand Down
5 changes: 5 additions & 0 deletions macos/install_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ else
fi

# Add Homebrew to PATH
# shellcheck disable=SC2016
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Expand All @@ -41,8 +42,10 @@ if ! java -version 2>&1 | grep -q "22"; then
echo "Java 22 not found. Installing..."
brew install openjdk@22
sudo ln -sfn /opt/homebrew/opt/openjdk@22/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-22.jdk
# shellcheck disable=SC2016
echo 'export PATH="/opt/homebrew/opt/openjdk@22/bin:$PATH"' >> ~/.zprofile
echo 'export CPPFLAGS="-I/opt/homebrew/opt/openjdk@22/include"' >> ~/.zprofile
# shellcheck disable=SC1090
source ~/.zprofile
else
echo "Java 22 is already installed."
Expand All @@ -60,7 +63,9 @@ fi
if ! python3.10 --version &> /dev/null; then
echo "Python 3.10 not found. Installing..."
brew install python@3.10
# shellcheck disable=SC2016
echo 'export PATH="/opt/homebrew/opt/python@3.10/bin:$PATH"' >> ~/.zprofile
# shellcheck disable=SC1090
source ~/.zprofile
else
echo "Python 3.10 is already installed."
Expand Down