Browse Source

Simplify sudo groups check

master
Pekka Helenius 4 years ago
parent
commit
cfcdfb35c1
1 changed files with 1 additions and 8 deletions
  1. +1
    -8
      updatewine.sh

+ 1
- 8
updatewine.sh View File

@ -124,14 +124,7 @@ if [[ $(uname -a | grep -c x86_64) -eq 0 ]]; then
exit 1 exit 1
fi fi
for i in ${SUDO_GROUPS[@]}; do
if [[ $(groups | grep -c ${i}) -ne 0 ]]; then
break
sudogrp=true
fi
done
if [[ ! $sudogrp ]]; then
if [[ $(groups | grep -cE $(echo ${SUDO_GROUPS[*]} | sed 's/ /|/g')) -eq 0 ]]; then
echo "You must belong to a sudo group (checked groups: ${SUDO_GROUPS[*]})." echo "You must belong to a sudo group (checked groups: ${SUDO_GROUPS[*]})."
exit 1 exit 1
fi fi


Loading…
Cancel
Save