<commit_before>#-------------------------------------------------------------------------------
#
# install/install-admin.sh
# Install script for dotfiles repo.
#
#-------------------------------------------------------------------------------

echo ">>> install-onetime"
echo

# Verify current user is an admin before proceeding

dsmemberutil checkmembership -U ${USER} -G admin

# Change ownership of /usr/local
ls -ld /usr/local
sudo chown -R ${USER}:staff /usr/local

# Install Homebrew
echo "Installing Homebrew"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# Install Homebrew cask
brew tap caskroom/cask

# ZSH<commit_msg>Add admin check to install-admin script<commit_after>#-------------------------------------------------------------------------------
#
# install/install-admin.sh
# Install script for dotfiles repo.
#
#-------------------------------------------------------------------------------

echo ">>> install-admin"
echo

# Verify current user is an admin before proceeding

dsmemberutil checkmembership -U "${USER}" -G "admin" > /dev/null
if [[ $? -ne 0 ]]; then
  echo "Only admins may run this script"
  exit 1
fi

# Change ownership of /usr/local
ls -ld /usr/local
sudo chown -R ${USER}:staff /usr/local

# Install Homebrew
echo "Installing Homebrew"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# Install Homebrew cask
brew tap caskroom/cask

# ZSH
{'fraction_non_alphanumeric': 0.3098976109215017, 'fraction_numerical': 0.0013651877133105802, 'mean_word_length': 1.7097966728280962, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '107495', 'n_tokens_mistral': 397, 'n_tokens_neox': 384, 'n_words': 125}