From 738b126852986986ca838a4d41a3ea6b0955a737 Mon Sep 17 00:00:00 2001 From: Brian Zalewski <59970525+ProfessorManhattan@users.noreply.github.com> Date: Wed, 14 Jun 2023 08:20:54 +0000 Subject: [PATCH] Latest --- home/dot_local/bin/executable_install-program | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home/dot_local/bin/executable_install-program b/home/dot_local/bin/executable_install-program index d45a76b6..ae9ae54b 100644 --- a/home/dot_local/bin/executable_install-program +++ b/home/dot_local/bin/executable_install-program @@ -1530,10 +1530,10 @@ async function addUserGroup(group) { } } else if (osType === 'darwin') { runCommand(`Creating the ${group} group`, `sudo dscl . create /Groups/${group}`) - runCommand(`Ensuring the ${group} group has a GID`, `if [[ "$(sudo dscl . read /Groups/$GROUP gid 2>&1)" == *'No such key'* ]]; then MAX_ID_GROUP="$(dscl . -list /Groups gid | awk '{print $2}' | sort -ug | tail -1)"; GROUP_ID="$((MAX_ID_GROUP+1))"; sudo dscl . create /Groups/${group} gid "$GROUP_ID"; fi`) + runCommand(`Ensuring the ${group} group has a GID`, `bash -c "if [[ "$(sudo dscl . read /Groups/$GROUP gid 2>&1)" == *'No such key'* ]]; then MAX_ID_GROUP="$(dscl . -list /Groups gid | awk '{print $2}' | sort -ug | tail -1)"; GROUP_ID="$((MAX_ID_GROUP+1))"; sudo dscl . create /Groups/${group} gid "$GROUP_ID"; fi"`) runCommand(`Adding the ${group} user`, `sudo dscl . create /Users/${group}`) - runCommand(`Ensuring the ${group} user has a PrimaryGroupID`, `if [[ "$(sudo dscl . read /Users/${group} PrimaryGroupID 2>&1)" == *'No such key'* ]]; then sudo dscl . create /Users/${group} PrimaryGroupID 20; fi`) - runCommand(`Ensuring the ${group} user has a UniqueID`, `if [[ "$(sudo dscl . read /Users/${group} UniqueID 2>&1)" == *'No such key'* ]]; then MAX_ID_USER="$(dscl . -list /Users UniqueID | awk '{print $2}' | sort -ug | tail -1)"; USER_ID="$((MAX_ID_USER+1))"; sudo dscl . create /Users/${group} UniqueID "$USERID"; fi`) + runCommand(`Ensuring the ${group} user has a PrimaryGroupID`, `bash -c "if [[ "$(sudo dscl . read /Users/${group} PrimaryGroupID 2>&1)" == *'No such key'* ]]; then sudo dscl . create /Users/${group} PrimaryGroupID 20; fi"`) + runCommand(`Ensuring the ${group} user has a UniqueID`, `bash -c "if [[ "$(sudo dscl . read /Users/${group} UniqueID 2>&1)" == *'No such key'* ]]; then MAX_ID_USER="$(dscl . -list /Users UniqueID | awk '{print $2}' | sort -ug | tail -1)"; USER_ID="$((MAX_ID_USER+1))"; sudo dscl . create /Users/${group} UniqueID "$USERID"; fi"`) runCommand(`Adding the ${group} user to the ${group} group`, `sudo dseditgroup -o edit -t user -a ${group} ${group}`) runCommand(`Adding the ${process.env.USER} user to the ${group} group`, `sudo dseditgroup -o edit -t user -a ${process.env.USER} ${group}`) } else if (osType === 'windows') {