<commit_before>#!/bin/sh

if test $# != 1 ; then
  echo 2>1 "Usage: $0 path/to/libfoo.la"
  exit 1
fi

result=

for lib in `grep ^dependency_libs= $1 \
               | sed 's/^dependency_libs=//' | sed "s/'//g"` ; do

    case $lib in 

        -l* | -L* )
            result="$result $lib"
	;;
	    
        *.la)
	    path=`echo $lib | sed 's:/*lib[^/]*.la::'`
	    libname=`echo $lib | sed 's:^.*lib::' | sed 's/\.la//'`
	    result="$result -L$path -L$path/.libs -l$libname"
        ;;
	    
    esac
    
done

echo $result<commit_msg>Only include -L$path/.libs conditionally on the existence of the $path/.libs directory.<commit_after>#!/bin/sh

if test $# != 1 ; then
    echo 2>1 "Usage: $0 path/to/libfoo.la"
    exit 1
fi

result=

for lib in `grep ^dependency_libs= $1 \
               | sed 's/^dependency_libs=//' | sed "s/'//g"` ; do

    case $lib in

        -l* | -L* )
            result="$result $lib"
        ;;

        *.la)
            path=`echo $lib | sed 's:/*lib[^/]*.la::'`
            libname=`echo $lib | sed 's:^.*lib::' | sed 's/\.la//'`
            result="$result -L$path"
            test -d $path/.libs && result="$result -L$path/.libs"
            result="$result -l$libname"
        ;;

    esac

done

echo $result
{'fraction_non_alphanumeric': 0.19936204146730463, 'fraction_numerical': 0.009569377990430622, 'mean_word_length': 1.7342047930283224, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4097877', 'n_tokens_mistral': 511, 'n_tokens_neox': 466, 'n_words': 116}