<commit_before>#!/bin/bash

# Create fac working directories

# cd /home
# mkdir -p fac_files
# chown -R fac fac_files
# sed -i -e 's/\(remount-ro\)/&,acl/; s/\(defaults\)/&,acl/' /etc/fstab
# mount -oremount /
# mount -oremount /home/ # in case your /home is in a different partition
# chgrp -R fac fac_files
# setfacl -Rdm u::rwx,g:fac:rwx,o::r /home/fac_files
# setfacl -Rm u::rwx,g:fac:rwx,o::r /home/fac_files
# cd /home/fac_files/
# mkdir lnls-fac lnls-sirius lnls-ima

set -e
set -x

function create_repo_dir {
	if [ ! -d $1/repos ]; then
		mkdir $1/repos
	fi
}

# Sirius
dir=/home/sirius
if [ -d $dir ]; then
    sudo setfacl -Rdm u::rwx,g:sirius:rwx,o::rx $dir
    sudo setfacl -Rm u::rwx,g:facs:rwx,o::rx $dir
	create_repo_dir $dir
else
    echo '/home/sirius does not exist. Aborting.'
    exit 1
fi

users=(facs imas)
for user in ${users[@]}; do
	dir="/home/$user"
	if [ -d $dir ]; then
		sudo setfacl -Rdm u::rwx,u:sirius:rwx,g:$user:rwx,o::rx $dir
		sudo setfacl -Rm u::rwx,u:sirius:rwx,g:$user:rwx,o::rx $dir
		create_repo_dir $dir
	else
	    echo "/home/$user does not exist. Aborting."
	    exit 1
	fi
done

exit 0<commit_msg>Add group permissions<commit_after>#!/bin/bash

# Create fac working directories

# cd /home
# mkdir -p fac_files
# chown -R fac fac_files
# sed -i -e 's/\(remount-ro\)/&,acl/; s/\(defaults\)/&,acl/' /etc/fstab
# mount -oremount /
# mount -oremount /home/ # in case your /home is in a different partition
# chgrp -R fac fac_files
# setfacl -Rdm u::rwx,g:fac:rwx,o::r /home/fac_files
# setfacl -Rm u::rwx,g:fac:rwx,o::r /home/fac_files
# cd /home/fac_files/
# mkdir lnls-fac lnls-sirius lnls-ima

set -e
set -x

function create_repo_dir {
	if [ ! -d $1/repos ]; then
		mkdir $1/repos
		chown -R $2:$2 $1/repos
	fi
}

# Sirius
dir=/home/sirius
if [ -d $dir ]; then
    sudo setfacl -Rdm u::rwx,g::rwx,g:sirius:rwx,o::rx $dir
    sudo setfacl -Rm u::rwx,g::rwx,g:facs:rwx,o::rx $dir
	create_repo_dir $dir sirius
else
    echo '/home/sirius does not exist. Aborting.'
    exit 1
fi

users=(facs imas)
for user in ${users[@]}; do
	dir="/home/$user"
	if [ -d $dir ]; then
		sudo setfacl -Rdm u::rwx,u:sirius:rwx,g::rwx,g:$user:rwx,o::rx $dir
		sudo setfacl -Rm u::rwx,u:sirius:rwx,g::rwx,g:$user:rwx,o::rx $dir
		create_repo_dir $dir $user
	else
	    echo "/home/$user does not exist. Aborting."
	    exit 1
	fi
done

exit 0
{'fraction_non_alphanumeric': 0.16899618805590852, 'fraction_numerical': 0.005506141465480729, 'mean_word_length': 3.3821892393320963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2130817', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1050, 'n_words': 267}