2023-04-18 22:46:43 -07:00
|
|
|
{{- if (eq .host.distro.family "darwin") -}}
|
2022-12-04 21:51:02 -08:00
|
|
|
#!/usr/bin/env bash
|
2023-04-12 18:27:13 -07:00
|
|
|
# @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.
|
2022-12-04 21:51:02 -08:00
|
|
|
|
2023-01-24 20:36:59 -08:00
|
|
|
{{ includeTemplate "universal/profile-before" }}
|
|
|
|
{{ includeTemplate "universal/logg-before" }}
|
2022-12-04 21:51:02 -08:00
|
|
|
|
2022-12-24 02:37:37 -08:00
|
|
|
### Ensure user has group of same name (required for Macports)
|
2022-12-04 21:51:02 -08:00
|
|
|
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
|
2023-04-15 16:16:14 -07:00
|
|
|
{{ end -}}
|