<commit_before>#!/bin/sh

# FIXME //TRANSLIT isn't supported with musl-libc (used by alpine linux), by intension!
# see https://github.com/akrennmair/newsbeuter/issues/364#issuecomment-250208235
# and http://wiki.musl-libc.org/wiki/Functional_differences_from_glibc#iconv
remove_iconv_translit_usage() {
  sectionNote "disable //TRANSLIT iconv flag usage, musl-libc does not support it!"
  
  local FILE_LIST="$WORKDIR/vendor/spryker/util-text/src/Spryker/Service/UtilText/Model/Slug.php"
  for f in $FILE_LIST; do
    sectionNote "doing it for: $f"
    sed -i 's#//TRANSLIT##g' $f
  done
}
<commit_msg>test if the file to be patched exists while replacing //TRANSLIT<commit_after>#!/bin/sh

# FIXME //TRANSLIT isn't supported with musl-libc (used by alpine linux), by intension!
# see https://github.com/akrennmair/newsbeuter/issues/364#issuecomment-250208235
# and http://wiki.musl-libc.org/wiki/Functional_differences_from_glibc#iconv
remove_iconv_translit_usage() {
  sectionNote "disable //TRANSLIT iconv flag usage, musl-libc does not support it!"
  
  local FILE_LIST="$WORKDIR/vendor/spryker/util-text/src/Spryker/Service/UtilText/Model/Slug.php"
  for f in $FILE_LIST; do
    if [ -e "$f" ]; then
      sectionNote "doing it for: $f"
      sed -i 's#//TRANSLIT##g' $f
    fi
  done
}

{'fraction_non_alphanumeric': 0.12761020881670534, 'fraction_numerical': 0.018561484918793503, 'mean_word_length': 4.196787148594377, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2887272', 'n_tokens_mistral': 505, 'n_tokens_neox': 470, 'n_words': 107}