<commit_before>function(install_rule src_file)

  get_filename_component(src_file_EXT ${src_file} EXT)
  get_filename_component(src_file_NAME ${src_file} NAME)
  get_filename_component(src_file_NAME_WE ${src_file} NAME_WE)
  get_filename_component(src_file_PATH ${src_file} PATH)

  file(GLOB src_file_star "${src_file_PATH}/${src_file_NAME_WE}*")
  foreach(sfile ${src_file_star})
    get_filename_component(sfile_NAME ${sfile} NAME)
    string(TOLOWER "${sfile_NAME}" sfile_NAME_LOWER)

    get_filename_component(sfile_ABS "${sfile}" ABSOLUTE)
    string(TOLOWER "${sfile_ABS}" sfile_ABS_LOWER)
    set(install_type)
    set(install_dir)
    if ("${sfile_NAME_LOWER}" MATCHES "^(otb|mvd)([a-z0-9]+)test*.*" )
      if(PKG_DEBUG)
        message("SKIP INSTALL for ${sfile_NAME_LOWER}")
      endif()
      continue()
    elseif("${sfile_ABS_LOWER}" MATCHES "(\\.exe)$")
      set(install_type PROGRAMS)
      set(install_dir bin)
    elseif("${sfile_ABS_LOWER}" MATCHES "(\\.dll)$")
      set(install_type FILES)
      set(install_dir bin) 
    elseif("${sfile_ABS_LOWER}" MATCHES "(\\.lib)$")
      set(install_type FILES)
      set(install_dir lib)
    elseif("${sfile_ABS_LOWER}" MATCHES "(\\.pyd)$")
      #python bindings are installed in install_python_bindings
      continue()
    elseif("${sfile_ABS_LOWER}" MATCHES "\\.lnk$")
      #we don't install symlink on windows. issue a warning
      set(install_type "symlink")
      set(install_dir)
    elseif("${sfile_ABS_LOWER}" MATCHES "(\\.a)$")
      set(install_type FILES)
      set(install_dir lib)
    elseif("${sfile_ABS_LOWER}" MATCHES "\\.prl$")
      continue()
    elseif("${sfile_ABS_LOWER}" MATCHES "\\.la$")
      continue()
    elseif("${sfile_NAME_LOWER}" MATCHES "^otbapp_")
      set(install_dir "lib/otb/applications")
      set(install_type PROGRAMS)
      install_otbapp_wrapper_scripts(${sfile_NAME})
    else()
      if(UNIX)
	#the last else() loop where we run a 'file' command to find file type and directory
	set(install_type)
	set(install_dir)
	#this is whole other story
	detect_using_file_command(${sfile_ABS} install_type install_dir)
      endif(UNIX)
    endif()

    if(install_type STREQUAL "symlink")
      #we don't install symlink on windows. issue a warning and continue
      if(PKG_DEBUG)
        message("${sfile_ABS} is a symbolic link and this will be excluded from package")
      endif()
      continue()
    endif()
    
    if(NOT install_type OR NOT install_type)
      #throw fatal error and return
      message(FATAL_ERROR "sfile_ABS=${sfile_ABS}.\ninstall_type=${install_dir}\ninstall_dir=${install_dir}")
      return()
    endif()

    install(${install_type} "${sfile}"
      DESTINATION
      "${PKG_STAGE_DIR}/${install_dir}"
      )

  endforeach()  
endfunction()   
<commit_msg>BUG :otbapp must be installed to lib/otb/application (always)<commit_after>function(install_rule src_file)

  get_filename_component(src_file_EXT ${src_file} EXT)
  get_filename_component(src_file_NAME ${src_file} NAME)
  get_filename_component(src_file_NAME_WE ${src_file} NAME_WE)
  get_filename_component(src_file_PATH ${src_file} PATH)

  file(GLOB src_file_star "${src_file_PATH}/${src_file_NAME_WE}*")
  foreach(sfile ${src_file_star})
    get_filename_component(sfile_NAME ${sfile} NAME)
    string(TOLOWER "${sfile_NAME}" sfile_NAME_LOWER)

    get_filename_component(sfile_ABS "${sfile}" ABSOLUTE)
    string(TOLOWER "${sfile_ABS}" sfile_ABS_LOWER)
    set(install_type)
    set(install_dir)
    if ("${sfile_NAME_LOWER}" MATCHES "^(otb|mvd)([a-z0-9]+)test*.*" )
      if(PKG_DEBUG)
        message("SKIP INSTALL for ${sfile_NAME_LOWER}")
      endif()
      continue()
    elseif("${sfile_ABS_LOWER}" MATCHES "(\\.exe)$")
      set(install_type PROGRAMS)
      set(install_dir bin)
    elseif("${sfile_ABS_LOWER}" MATCHES "(\\.dll)$")
      set(install_type FILES)
      set(install_dir bin) 
    elseif("${sfile_ABS_LOWER}" MATCHES "(\\.lib)$")
      set(install_type FILES)
      set(install_dir lib)
    elseif("${sfile_ABS_LOWER}" MATCHES "(\\.pyd)$")
      #python bindings are installed in install_python_bindings
      continue()
    elseif("${sfile_ABS_LOWER}" MATCHES "\\.lnk$")
      #we don't install symlink on windows. issue a warning
      set(install_type "symlink")
      set(install_dir)
    elseif("${sfile_ABS_LOWER}" MATCHES "(\\.a)$")
      set(install_type FILES)
      set(install_dir lib)
    elseif("${sfile_ABS_LOWER}" MATCHES "\\.prl$")
      continue()
    elseif("${sfile_ABS_LOWER}" MATCHES "\\.la$")
      continue()
    else()
      if(UNIX)
        #the last else() loop where we run a 'file' command to find file type and directory
        set(install_type)
        set(install_dir)
        #this is whole other story
        detect_using_file_command(${sfile_ABS} install_type install_dir)
      endif(UNIX)
    endif()

    if(install_type STREQUAL "symlink")
      #we don't install symlink on windows. issue a warning and continue
      if(PKG_DEBUG)
        message("${sfile_ABS} is a symbolic link and this will be excluded from package")
      endif()
      continue()
    endif()
    
    # This check comes outside the first if-elseif ladder
    # because no matter what extension of file type, otbapp_* must go
    # into lib/otb/applications
  if("${sfile_NAME_LOWER}" MATCHES "^otbapp_")
    install_otbapp_wrapper_scripts(${sfile_NAME})
    set(install_dir "lib/otb/applications")
    set(install_type PROGRAMS)
  endif()
  
    if(NOT install_type OR NOT install_dir)
      #throw fatal error and return
      message(FATAL_ERROR "sfile_ABS=${sfile_ABS}.\ninstall_type=${install_type}\ninstall_dir=${install_dir}")
      return()
    endif()

    install(${install_type} "${sfile}"
      DESTINATION
      "${PKG_STAGE_DIR}/${install_dir}"
      )

  endforeach()  
endfunction()   

{'fraction_non_alphanumeric': 0.12966769441589585, 'fraction_numerical': 0.0006851661527920521, 'mean_word_length': 3.754885993485342, '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': '1525773', 'n_tokens_mistral': 2169, 'n_tokens_neox': 2076, 'n_words': 415}