mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-13 20:30:02 +00:00
users: fix forceRecreate
bash comparison
This commit is contained in:
parent
4b9b83d5a9
commit
0b638a97c0
1 changed files with 2 additions and 2 deletions
|
@ -92,7 +92,7 @@ in
|
|||
${optionalString cfg.forceRecreate ''
|
||||
g=$(dscl . -read '/Groups/${v.name}' PrimaryGroupID 2> /dev/null) || true
|
||||
g=''${g#PrimaryGroupID: }
|
||||
if [ "$g" -eq ${toString v.gid} ]; then
|
||||
if [[ "$g" -eq ${toString v.gid} ]]; then
|
||||
echo "deleting group ${v.name}..." >&2
|
||||
dscl . -delete '/Groups/${v.name}' 2> /dev/null
|
||||
else
|
||||
|
@ -141,7 +141,7 @@ in
|
|||
${optionalString cfg.forceRecreate ''
|
||||
u=$(dscl . -read '/Users/${v.name}' UniqueID 2> /dev/null) || true
|
||||
u=''${u#UniqueID: }
|
||||
if [ "$u" -eq ${toString v.uid} ]; then
|
||||
if [[ "$u" -eq ${toString v.uid} ]]; then
|
||||
echo "deleting user ${v.name}..." >&2
|
||||
dscl . -delete '/Users/${v.name}' 2> /dev/null
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue