25 lines
358 B
Bash
Executable File
25 lines
358 B
Bash
Executable File
#!/bin/sh
|
|
|
|
sudo true
|
|
|
|
gum style --foreground 4 "
|
|
ASSIGNING GROUPS:
|
|
"
|
|
|
|
for file in "$GROUPS_DIR"/*; do
|
|
|
|
[ ! -f "$file" ] && continue
|
|
|
|
group="$(basename "$file")"
|
|
|
|
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)"
|