install.fairie/home/.chezmoiscripts/universal/run_onchange_before_20-ensure-user-group.sh.tmpl
Brian Zalewski a50ee7340c Update 2 files
- /home/.chezmoiscripts/universal/run_onchange_after_40-firefox.sh.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_20-ensure-user-group.sh.tmpl
2023-04-19 05:46:43 +00:00

14 lines
659 B
Cheetah

{{- if (eq .host.distro.family "darwin") -}}
#!/usr/bin/env bash
# @file macOS Ensure User Group
# @brief Ensures that the provisioning user has a group on the system with the same name
# @description
# This script ensures that there is a group with the same name of the provisioning user available on the system.
{{ includeTemplate "universal/profile-before" }}
{{ includeTemplate "universal/logg-before" }}
### Ensure user has group of same name (required for Macports)
logg info 'Ensuring user has a group with the same name and that it is a member. Sudo privileges may be required'
echo y | sudo dseditgroup -o create "$USER" > /dev/null
{{ end -}}