a50ee7340c
- /home/.chezmoiscripts/universal/run_onchange_after_40-firefox.sh.tmpl - /home/.chezmoiscripts/universal/run_onchange_before_20-ensure-user-group.sh.tmpl
14 lines
659 B
Cheetah
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 -}}
|