<commit_before>#!/bin/bash

database='sqlite'
number_of_users=10
root='/home/schiesbn/repos/nextcloud/server/'
inst_dir='master'
admin_user='admin'
admin_password='<PASSWORD>'

declare -A apps=(
    ['files_texteditor']='<EMAIL>:owncloud/files_texteditor.git'
)

# install or reset server
if [ -d $root$inst_dir ]; then
    echo "Reset server installation"
    cd $root$inst_dir
    git checkout master
    git pull
    # cleanup data directory
    sudo rm $root$inst_dir/data/* -rf
    #cleanup config.php
    sudo rm $root$inst_dir/config/config.php
else
    echo "Install new server"
    mkdir $root$inst_dir
    cd $root$inst_dir
    git clone <EMAIL>:nextcloud/server.git .
fi

echo "Update 3rd party repository"
cd $root/$inst_dir
git submodule update --init

# set the correct permissions for the data folder
echo "Update data folder permissions"
sudo chmod 770 $root$inst_dir/data
sudo chown www-data:www-data $root$inst_dir/data

# set the correct permissions for the apps folder
echo "Update apps folder permissions"
sudo chmod 770 $root$inst_dir/apps<commit_msg>add owncloud as additionl remote<commit_after>#!/bin/bash

database='sqlite'
number_of_users=10
root='/home/schiesbn/repos/nextcloud/server/'
inst_dir='master'
admin_user='admin'
admin_password='<PASSWORD>'

declare -A apps=(
    ['files_texteditor']='<EMAIL>:owncloud/files_texteditor.git'
)

# install or reset server
if [ -d $root$inst_dir ]; then
    echo "Reset server installation"
    cd $root$inst_dir
    git checkout master
    git pull
    # cleanup data directory
    sudo rm $root$inst_dir/data/* -rf
    #cleanup config.php
    sudo rm $root$inst_dir/config/config.php
else
    echo "Install new server"
    mkdir $root$inst_dir
    cd $root$inst_dir
    git clone <EMAIL>:nextcloud/server.git .
fi

git remote add owncloud <EMAIL>:owncloud/core.git
git fetch owncloud

echo "Update 3rd party repository"
cd $root/$inst_dir
git submodule update --init

# set the correct permissions for the data folder
echo "Update data folder permissions"
sudo chmod 770 $root$inst_dir/data
sudo chown www-data:www-data $root$inst_dir/data

# set the correct permissions for the apps folder
echo "Update apps folder permissions"
sudo chmod 770 $root$inst_dir/apps
{'fraction_non_alphanumeric': 0.09977628635346757, 'fraction_numerical': 0.008053691275167786, 'mean_word_length': 4.400966183574879, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '99823', 'n_tokens_mistral': 753, 'n_tokens_neox': 718, 'n_words': 219}