Skip to content

Commit

Permalink
Skip system permissions for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxattax97 committed Oct 28, 2024
1 parent 0fe2a20 commit 5edb329
Showing 1 changed file with 41 additions and 38 deletions.
79 changes: 41 additions & 38 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1011,18 +1011,19 @@ case "$response" in
xdg-settings set default-web-browser brave-browser.desktop
fi

# TODO: Install extensions
#[email protected]
#blur-my-shell@aunetx
#[email protected]
#[email protected]
#[email protected]
#[email protected]
#[email protected]
#[email protected]
#[email protected]
#[email protected]
#[email protected]
extensions=(
"[email protected]"
"blur-my-shell@aunetx"
"[email protected]"
"[email protected]"
"[email protected]"
)

for extension in "${extensions[@]}"; do
# TODO: Need to download the extensions first.
# gnome-extensions install "$extension"
gnome-extensions enable "$extension"
done

# Clear the bookmarks file
printf "" > "${HOME}/.config/gtk-3.0/bookmarks"
Expand Down Expand Up @@ -1429,36 +1430,38 @@ case "$response" in
;;
esac

read -r -p "Would you like to setup system permissions? [y/N] " response
case "$response" in
[yY][eE][sS] | [yY])
if [[ "$(uname)" != "Darwin" ]]; then
read -r -p "Would you like to setup system permissions? [y/N] " response
case "$response" in
[yY][eE][sS] | [yY])

if [[ -x "$(command -v pw)" ]]; then
sudo pw groupmod video -m "$USER"
sudo pw groupmod docker -m "$USER"
sudo pw groupmod wireshark -m "$USER"
sudo pw groupmod wheel -m "$USER"
sudo pw groupmod tty -m "$USER"
sudo pw groupmod nordvpn -m "$USER"
else
# TODO: Check that these are correct groupadd commands.
sudo groupadd -r docker
sudo usermod -a -G docker "$USER"
if [[ -x "$(command -v pw)" ]]; then
sudo pw groupmod video -m "$USER"
sudo pw groupmod docker -m "$USER"
sudo pw groupmod wireshark -m "$USER"
sudo pw groupmod wheel -m "$USER"
sudo pw groupmod tty -m "$USER"
sudo pw groupmod nordvpn -m "$USER"
else
# TODO: Check that these are correct groupadd commands.
sudo groupadd -r docker
sudo usermod -a -G docker "$USER"

sudo groupadd -r wireshark
sudo usermod -a -G wireshark "$USER"
sudo groupadd -r wireshark
sudo usermod -a -G wireshark "$USER"

sudo groupadd -r tty
sudo usermod -a -G tty "$USER"
sudo groupadd -r tty
sudo usermod -a -G tty "$USER"

sudo groupadd -r nordvpn
sudo usermod -a -G nordvpn "$USER"
fi
;;
*)
echo "Skipping permission setup"
;;
esac
sudo groupadd -r nordvpn
sudo usermod -a -G nordvpn "$USER"
fi
;;
*)
echo "Skipping permission setup"
;;
esac
fi

if [ -n "${AUTOMATED}" ]; then
response='n'
Expand Down

0 comments on commit 5edb329

Please sign in to comment.