<commit_before>#!/bin/bash
LDPRESENT=1
command -v edje_cc >/dev/null 2>&1 || { echo >&2 "Edje compiler not found"; exit 1; }
command -v ldconfig >/dev/null 2>&1 || { echo >&2 "Warning! Ldconfig not found. GTK3 version detection is not possible. Appropriate version need to be copied manually."; LDPRESENT=0;}
rm -f Makefile

if [ $LDPRESENT -eq 1 ]
then
VERSIONSTR=`ldconfig -v | grep libgtk-3`
VERSIONPARSE=(`echo $VERSIONSTR | tr '.' ' '`)
VERSIONINFO=${VERSIONPARSE[7]}
if [ "$VERSIONINFO" -ge "800" ]
then
if [ "$VERSIONINFO" -lt "899" ]
then
GTKVER="3.8"
fi
fi 
if [ "$VERSIONINFO" -ge "1000" ]
then
if [ "$VERSIONINFO" -lt "1099" ]
then
GTKVER="3.10"
fi
fi 
if [ "$VERSIONINFO" -ge "1200" ]
then
if [ "$VERSIONINFO" -lt "1299" ]
then
GTKVER="3.12"
fi
fi
if [ "$VERSIONINFO" -ge "1400" ]
then
if [ "$VERSIONINFO" -lt "1499" ]
then
GTKVER="3.14"
fi
fi
if [ "$VERSIONINFO" -ge "1600" ]
then
if [ "$VERSIONINFO" -lt "1699" ]
then
GTKVER="3.16"
fi
fi
echo "Version of GTK3 is "${GTKVER}
DETGTK="cp -rf gtk/GTK_"${GTKVER}"/detourious ~/.themes"
DETDARKGTK="cp -rf gtk/GTK_"${GTKVER}"/detourious-dark ~/.themes"
fi

echo 'all:
	edje_cc -id . -fd . main.edc -o detourious.edj
	edje_cc -DBUILD_ILLUME=1 -DUSE_BOLD_FONT=1 -id . -fd . main.edc -o detourious-illume.edj
	edje_cc -DCOLORS=1 -id . -fd . main.edc -o detourious-dark.edj
	edje_cc -DBUILD_ILLUME=1 -DUSE_BOLD_FONT=1 -DCOLORS=1 -id . -fd . main.edc -o detourious-illume-dark.edj

install:
	rm -f ~/.elementary/themes/detourious.edj
	rm -f ~/.elementary/themes/detourious-illume.edj
	rm -f ~/.elementary/themes/detourious-dark.edj
	rm -f ~/.elementary/themes/detourious-illume-dark.edj
	cp detourious.edj ~/.elementary/themes
	cp detourious-illume.edj ~/.elementary/themes<commit_msg>Add checking for themes dir exist<commit_after>#!/bin/bash
LDPRESENT=1
command -v edje_cc >/dev/null 2>&1 || { echo >&2 "Edje compiler not found"; exit 1; }
command -v ldconfig >/dev/null 2>&1 || { echo >&2 "Warning! Ldconfig not found. GTK3 version detection is not possible. Appropriate version need to be copied manually."; LDPRESENT=0;}
rm -f Makefile

if [ $LDPRESENT -eq 1 ]
then
VERSIONSTR=`ldconfig -v | grep libgtk-3`
VERSIONPARSE=(`echo $VERSIONSTR | tr '.' ' '`)
VERSIONINFO=${VERSIONPARSE[7]}
if [ "$VERSIONINFO" -ge "800" ]
then
if [ "$VERSIONINFO" -lt "899" ]
then
GTKVER="3.8"
fi
fi 
if [ "$VERSIONINFO" -ge "1000" ]
then
if [ "$VERSIONINFO" -lt "1099" ]
then
GTKVER="3.10"
fi
fi 
if [ "$VERSIONINFO" -ge "1200" ]
then
if [ "$VERSIONINFO" -lt "1299" ]
then
GTKVER="3.12"
fi
fi
if [ "$VERSIONINFO" -ge "1400" ]
then
if [ "$VERSIONINFO" -lt "1499" ]
then
GTKVER="3.14"
fi
fi
if [ "$VERSIONINFO" -ge "1600" ]
then
if [ "$VERSIONINFO" -lt "1699" ]
then
GTKVER="3.16"
fi
fi
echo "Version of GTK3 is "${GTKVER}
DETGTK="cp -rf gtk/GTK_"${GTKVER}"/detourious ~/.themes"
DETDARKGTK="cp -rf gtk/GTK_"${GTKVER}"/detourious-dark ~/.themes"
fi

echo 'all:
	edje_cc -id . -fd . main.edc -o detourious.edj
	edje_cc -DBUILD_ILLUME=1 -DUSE_BOLD_FONT=1 -id . -fd . main.edc -o detourious-illume.edj
	edje_cc -DCOLORS=1 -id . -fd . main.edc -o detourious-dark.edj
	edje_cc -DBUILD_ILLUME=1 -DUSE_BOLD_FONT=1 -DCOLORS=1 -id . -fd . main.edc -o detourious-illume-dark.edj

install:
	mkdir -p ~/.elementary/themes
	mkdir -p ~/.themes
	rm -f ~/.elementary/themes/detourious.edj
	rm -f ~/.elementary/themes/detourious-illume.edj
	rm -f ~/.elementary/themes/detourious-dark.edj
	rm -f ~/.elementary/themes/detourious-illume-dark.edj
	cp detourious.edj ~/.elementary/themes
	cp detourious-illume.edj ~/.elementary/themes
{'fraction_non_alphanumeric': 0.17056667606427967, 'fraction_numerical': 0.04059768818720045, 'mean_word_length': 3.8141112618724557, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '6012058', 'n_tokens_mistral': 1627, 'n_tokens_neox': 1516, 'n_words': 384}