<commit_before>#!/bin/bash

user=`whoami`
p1="/home/$user"
p2="/etc/$user"

cd /tmp

########################################################
yes $IRODS_PASS | sudo -S echo "Enabling priviledges"
# Wait for sql init/creation
sleep 5

# ########################################################
# Using the volume
## Note: this should be removed when fixed the hack inside the dockerfile.
echo "Fix missing files for volumes"
sudo cp copy/etcirods/* $p2/

#########################################################
# Note: using docker volumes, it requires a permission fix, until:
#https://github.com/docker/docker/issues/7198
echo "Fixing permissions"
sudo chown -R $UID:$GROUPS $p1
sudo chown -R $UID:$GROUPS $p2

#########################################################
# Connect server to DB and init
echo "Configure & connect"
MYDATA="/tmp/answers"
./expect_irods $MYDATA
sudo /var/lib/irods/packaging/setup_irods.sh < $MYDATA

#########################################################
# Check if it works
sleep 5
echo "Testing"
yes $IRODS_PASS | ils 2> /dev/null
echo "Connected"
<commit_msg>Checking the last command to make sure everything went well.<commit_after>#!/bin/bash

user=`whoami`
p1="/home/$user"
p2="/etc/$user"

cd /tmp

########################################################
yes $IRODS_PASS | sudo -S echo "Enabling priviledges"
# Wait for sql init/creation
sleep 7

# ########################################################
# Using the volume
## Note: this should be removed when fixed the hack inside the dockerfile.
echo "Fix missing files for volumes"
sudo cp copy/etcirods/* $p2/

#########################################################
# Note: using docker volumes, it requires a permission fix, until:
#https://github.com/docker/docker/issues/7198
echo "Fixing permissions"
sudo chown -R $UID:$GROUPS $p1
sudo chown -R $UID:$GROUPS $p2

#########################################################
# Connect server to DB and init
echo "Configure & connect"
MYDATA="/tmp/answers"
./expect_irods $MYDATA
sudo /var/lib/irods/packaging/setup_irods.sh < $MYDATA

#########################################################
# Check if it works
sleep 5
echo "Testing"
yes $IRODS_PASS | ils 2> /dev/null
if [ "$?" -ne 0 ]; then
    echo "Failed. Please check your internet connection!"
else
    echo "Connected"
fi

{'fraction_non_alphanumeric': 0.332762312633833, 'fraction_numerical': 0.010706638115631691, 'mean_word_length': 5.731988472622478, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5814217', 'n_tokens_mistral': 719, 'n_tokens_neox': 667, 'n_words': 218}