<commit_before>#!/bin/bash

# Create users.

# Needs user interaction
function user_exists {
	id -u $1 >/dev/null 2>&1
	echo $?
}

if [ $(user_exists fac) -eq 0 ]; then
	echo 'fac user already exists'
else
	# echo 'fac user does not exist'
	adduser --system fac
	usermod -aG sudo fac
fi

users=(<NAME> <NAME> <NAME>)

for user in ${users[@]}; do
	if [ $(user_exists $user) -eq 0 ]; then
		echo $user' user already exists'
	else
		# echo $user' does not exist'
		adduser $user --ingroup fac
		usermod -aG sudo $user
	fi
done
<commit_msg>Adapted create user scripts to be promptless<commit_after>#!/bin/bash

# Create users.

# Needs user interaction
function user_exists {
	id -u $1 >/dev/null 2>&1
	echo $?
}
# # Add user/group fac
# if [ $(user_exists fac) -eq 0 ]; then
# 	echo 'fac user already exists'
# else
# 	adduser fac --gecos
# 	usermod -aG sudo fac
# fi
# # Add user/group sirius
# if [ $(user_exists fac) -eq 0 ]; then
# 	echo 'sirius user already exists'
# else
# 	adduser sirius --gecos '' --disabled-password
# 	usermod -aG sudo sirius
# 	echo "sirius:boo500mev" | sudo chpasswd
# fi

groups=(sirius fac)
for user in ${groups[@]}; do
	if [ $(user_exists $user) -eq 0 ]; then
		echo $user' user already exists'
	else
		adduser $user --gecos '' --disabled-password
		usermod -aG sudo $user
		echo "$user:boo500mev" | sudo chpasswd
	fi
done

users=(fernando <NAME> <NAME>)
for user in ${users[@]}; do
	if [ $(user_exists $user) -eq 0 ]; then
		echo $user' user already exists'
	else
		adduser $user --ingroup fac --gecos '' --disabled-password
		usermod -aG sudo $user
		echo "$user:boo500mev" | sudo chpasswd
	fi
done

{'fraction_non_alphanumeric': 0.1367259350091968, 'fraction_numerical': 0.012875536480686695, 'mean_word_length': 3.4227642276422765, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 12, 'https://': 0, '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': '4536422', 'n_tokens_mistral': 658, 'n_tokens_neox': 618, 'n_words': 215}