Skip to content

Commit

Permalink
Introduce shellcheck to CICD
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreWohnsland committed Jul 20, 2024
1 parent e624af5 commit 50440ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linting
name: ShellCheck
on: [pull_request]
jobs:
shellcheck:
Expand Down
6 changes: 3 additions & 3 deletions scripts/setup_non_rpi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

# Check if the script is running on a non-Raspberry Pi device
if ! is_raspberry_pi; then
echo "$(whoami) ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/99_$(whoami)_nopasswd >/dev/null
sudo chmod 0440 /etc/sudoers.d/99_$(whoami)_nopasswd
echo "$(whoami) ALL=(ALL) NOPASSWD: ALL" | sudo tee "/etc/sudoers.d/99_$(whoami)_nopasswd" >/dev/null
sudo chmod 0440 "/etc/sudoers.d/99_$(whoami)_nopasswd"
if ! getent group gpio >/dev/null; then
echo "Creating gpio group"
sudo groupadd gpio
fi
echo "Setting up GPIOs for non Raspberry Pi devices"
sudo usermod -aG gpio $USER
sudo usermod -aG gpio "$USER"

# Create the setup_gpio_permissions.sh script
sudo cp .scripts/setup_gpio_permissions.sh /usr/local/bin/setup_gpio_permissions.sh
Expand Down

0 comments on commit 50440ff

Please sign in to comment.