<commit_before>#!/bin/sh

INSTALL_PREFIX="$1"

if test -z "$INSTALL_PREFIX"; then
	INSTALL_PREFIX="/usr/"
fi

HEADER_LOC="$INSTALL_PREFIX/include/"
LIB_LOC="$INSTALL_PREFIX/lib/"
BIN_LOC="$INSTALL_PREFIX/bin/"

# Headers
echo "INSTALL headers"
install -m 775 -d "${HEADER_LOC}GP"
for i in `ls include/`; do
	if [ -d "include/$i" ]; then
		echo " $i"
		install -m 775 -d "${HEADER_LOC}GP/$i"
		install -m 664 "include/$i/"*.h "${HEADER_LOC}GP/$i"
	else
		install -m 664 "include/$i" "${HEADER_LOC}GP/$i"
	fi
done

# Library
echo "INSTALL libraries"
install -m 775 -d "$LIB_LOC" 
install -m 664 build/*.so build/*.so.0 build/*.a "$LIB_LOC"

# Binaries
echo "INSTALL binaries"
install -m 755 gfxprim-config "$BIN_LOC"
<commit_msg>build: Fix the install script.<commit_after>#!/bin/sh

INSTALL_PREFIX="$1"

if test -z "$INSTALL_PREFIX"; then
	INSTALL_PREFIX="/usr"
fi

HEADER_LOC="$INSTALL_PREFIX/include/"
LIB_LOC="$INSTALL_PREFIX/lib/"
BIN_LOC="$INSTALL_PREFIX/bin/"

# Headers
echo "INSTALL headers"
install -m 775 -d "${HEADER_LOC}GP"
for i in `ls include/`; do
	if [ -d "include/$i" ]; then
		echo " $i"
		install -m 775 -d "${HEADER_LOC}GP/$i"
		install -m 664 "include/$i/"*.h "${HEADER_LOC}GP/$i"
	else
		install -m 664 "include/$i" "${HEADER_LOC}GP/$i"
	fi
done

# Library
echo "INSTALL libraries"
install -m 775 -d "$LIB_LOC" 

for i in build/*.so build/*.so.* build/*.a; do
	if [ -L "$i" ]; then
	        TARGET=`basename "$i"`
		SOURCE=`readlink "$i"`
		(cd "$LIB_LOC" && rm -f "$TARGET" && ln -s "$LIB_LOC$SOURCE" "$TARGET")
	else
		install "$i" "$LIB_LOC"
	fi
done

# Binaries
echo "INSTALL binaries"
install -m 755 gfxprim-config "$BIN_LOC"

{'fraction_non_alphanumeric': 0.18462469733656175, 'fraction_numerical': 0.025423728813559324, 'mean_word_length': 3.963963963963964, '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': '163434', 'n_tokens_mistral': 705, 'n_tokens_neox': 639, 'n_words': 179}