25 lines
373 B
Bash
Executable File
25 lines
373 B
Bash
Executable File
#!/bin/sh
|
|
|
|
sudo true
|
|
|
|
gum style --foreground 4 "
|
|
ASSIGNING GROUPS:
|
|
"
|
|
|
|
for file in "$GROUPS_DIR"/*.group; do
|
|
|
|
[ ! -f "$file" ] && continue
|
|
|
|
group="$(basename "${file%.group}")"
|
|
|
|
if sudo usermod -aG $group $USER; then
|
|
gum style --foreground 10 "✓ $group"
|
|
else
|
|
gum style --foreground 9 "✗ $group"
|
|
fi
|
|
done
|
|
|
|
gum style --foreground 6 "
|
|
Groups:
|
|
$(groups)"
|