<commit_before>#this lib handle the partitionning of the disks

partitionning_cleanup(){
    #this function clean the partitionning file
    #it supress comments and empty lines
    local input_file=$1

    CLEANED_PARTIONS_FILE=`mktemp`
    sed "s/#.*//" $input_file |grep -v '^$' >$CLEANED_PARTIONS_FILE
}

partitionning_get_disks_list(){
    #this function just give the list of the devices
    #$1 the cleaned list of partition
    local input_file=$1

    tmp=`mktemp`
    while read -r line
    do
       device=`echo $line |cut -d ' ' -f 1` 
       if ! grep -q "^$device$" $tmp
       then
           echo $device >>$tmp
       fi
    done < $input_file
    DEVICE_LIST=`cat $tmp|uniq`
    rm $tmp
}

partitionning_partitionning(){
    #this script create the partition
    #$1 -> the partionning file
    local input_file=$1
    local CLEANED_PARTIONS_FILE=`mktemp`
    common_cleanup_file $input_file  $CLEANED_PARTIONS_FILE
    #partitionning_cleanup $input_file

    local partitionning_dir_script=`mktemp -d`
    arch_partitionning_create_script $CLEANED_PARTIONS_FILE $partitionning_dir_script
    chmod -R 755 $partitionning_dir_script
    cd $partitionning_dir_script
    for s in `ls`
    do
        ./$s
    done
    cd -
}


#. ../arch/i686/A04_partionning.sh<commit_msg>suppressing a function (became useless since a previous refactorisation)<commit_after>#this lib handle the partitionning of the disks

partitionning_get_disks_list(){
    #this function just give the list of the devices
    #$1 the cleaned list of partition
    local input_file=$1

    tmp=`mktemp`
    while read -r line
    do
       device=`echo $line |cut -d ' ' -f 1` 
       if ! grep -q "^$device$" $tmp
       then
           echo $device >>$tmp
       fi
    done < $input_file
    DEVICE_LIST=`cat $tmp|uniq`
    rm $tmp
}

partitionning_partitionning(){
    #this script create the partition
    #$1 -> the partionning file
    local input_file=$1
    local CLEANED_PARTIONS_FILE=`mktemp`
    common_cleanup_file $input_file  $CLEANED_PARTIONS_FILE

    local partitionning_dir_script=`mktemp -d`
    arch_partitionning_create_script $CLEANED_PARTIONS_FILE $partitionning_dir_script
    chmod -R 755 $partitionning_dir_script
    cd $partitionning_dir_script
    for s in `ls`
    do
        ./$s
    done
    cd -
}


#. ../arch/i686/A04_partionning.sh
{'fraction_non_alphanumeric': 0.08577494692144373, 'fraction_numerical': 0.011464968152866241, 'mean_word_length': 3.0204778156996586, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '239447', 'n_tokens_mistral': 827, 'n_tokens_neox': 765, 'n_words': 215}