<commit_before>#!/bin/sh
#
#Makefile for zeplic
#

GOPATH:=$(shell go env GOPATH)
GOGET=$(shell) go get
GOBUILD=$(shell) go install

PACKAGE1="github.com/mistifyio/go-zfs"
PACKAGE2="github.com/pborman/uuid"
PACKAGE3="github.com/sevlyar/go-daemon"
PACKAGE4="github.com/kardianos/osext"

make:
	@printf "\n:: ZEPLIC ::\n"
	@printf "\nBuilding tree... "
	@if [ ! -d "$(GOPATH)/pkg" ] ; then sudo mkdir -p "$(GOPATH)/pkg" ; fi
	@if [ ! -d "$(GOPATH)/bin" ] ; then sudo mkdir -p "$(GOPATH)/bin" ; fi
	@printf "done!"
	@printf "\nGetting dependencies... "
	@if [ ! -d "$(GOPATH)/src/$(PACKAGE1)" ] ; then $(GOGET) $(PACKAGE1) ; fi
	@if [ ! -d "$(GOPATH)/src/$(PACKAGE2)" ] ; then $(GOGET) $(PACKAGE2) ; fi
	@if [ ! -d "$(GOPATH)/src/$(PACKAGE3)" ] ; then $(GOGET) $(PACKAGE3) ; fi
	@if [ ! -d "$(GOPATH)/src/$(PACKAGE4)" ] ; then $(GOGET) $(PACKAGE4) ; fi
	@printf "done!"
	@printf "\nSetting syslog daemon service... "
	@if [ -e "/etc/rsyslog.conf" ] && ! grep -q \!zeplic "/etc/rsyslog.conf" ; then sudo printf "\n\!zeplic\nlocal0.*\t\t\t\t\t-/var/log/zeplic.log\n" >> /etc/rsyslog.conf ; fi
	@if [ -e "/etc/syslog.conf" ] && ! grep -q \!zeplic "/etc/syslog.conf" ; then sudo printf "\n\!zeplic\nlocal0.*\t\t\t\t\t-/var/log/zeplic.log\n" >> /etc/syslog.conf ; fi	
	@printf "done!"
	@printf "\nBuilding... "
	@$(GOBUILD)
	@printf "done!"
	@printf "\nExporting your \$$\GOBIN... "
	@if [ -e "/root/.bashrc" ] && ! grep -q "$(GOPATH)/bin" "/root/.bashrc" ; then sudo printf "export PATH=\$$\PATH:$(GOPATH)/bin" >> ~/.bashrc ; fi
	@if [ -e "/root/.cshrc" ] && ! grep -q "$(GOPATH)/bin" "/root/.cshrc" ; then sudo printf "setenv PATH \"\$$\PATH\":$(GOPATH)/bin" >> ~/.cshrc ; fi
	@printf "done!\n\n"
	@printf "Remember to config your JSON file: /usr/local/etc/zeplic.d/config.json\n\n"

clean:
	@printf "\n:: ZEPLIC ::\n"
	@printf "\nCleaning dependencies... \c"
	@sudo rm -rf "$(GOPATH)/src/$(PACKAGE4)"
	@sudo rmdir "$(GOPATH)/src/$(PACKAGE4)" 2>/dev/null || :
	@sudo rm -rf "$(GOPATH)/src/$(PACKAGE3)"
	@sudo rmdir "$(GOPATH)/src/$(PACKAGE3)" 2>/dev/null || :
	@sudo rm -rf "$(GOPATH)/src/$(PACKAGE2)"
	@sudo rmdir "$(GOPATH)/src/$(PACKAGE2)" 2>/dev/null || :
	@sudo rm -rf "$(GOPATH)/src/$(PACKAGE1)"
	@sudo rmdir "$(GOPATH)/src/$(PACKAGE1)" 2>/dev/null || :
#	@rm -rf "$(GOPATH)/src/$(PACKAGE0)"
#	@rmdir "$(GOPATH)/src/$(PACKAGE0)" 2>/dev/null || :
	@printf "done!\n\n"<commit_msg>Updating makefile<commit_after>#!/bin/sh
#
#Makefile for zeplic
#

GOPATH:=$(shell go env GOPATH)
GOGET=$(shell) go get -v
#GOBUILD=$(shell) go install

PACKAGE1="github.com/mistifyio/go-zfs"
PACKAGE2="github.com/pborman/uuid"
PACKAGE3="github.com/sevlyar/go-daemon"
PACKAGE4="github.com/kardianos/osext"

make:
	@printf "\n:: ZEPLIC ::\n"
	@printf "\nBuilding tree... "
	@if [ ! -d "$(GOPATH)/pkg" ] ; then sudo mkdir -p "$(GOPATH)/pkg" ; fi
	@if [ ! -d "$(GOPATH)/bin" ] ; then sudo mkdir -p "$(GOPATH)/bin" ; fi
	@printf "done!"
	@printf "\nGetting dependencies... "
	@if [ ! -d "$(GOPATH)/src/$(PACKAGE1)" ] ; then $(GOGET) $(PACKAGE1) ; fi
	@if [ ! -d "$(GOPATH)/src/$(PACKAGE2)" ] ; then $(GOGET) $(PACKAGE2) ; fi
	@if [ ! -d "$(GOPATH)/src/$(PACKAGE3)" ] ; then $(GOGET) $(PACKAGE3) ; fi
	@if [ ! -d "$(GOPATH)/src/$(PACKAGE4)" ] ; then $(GOGET) $(PACKAGE4) ; fi
	@printf "done!"
	@printf "\nSetting syslog daemon service... "
	@if [ -e "/etc/rsyslog.conf" ] && ! grep -q \!zeplic "/etc/rsyslog.conf" ; then sudo printf "\n\!zeplic\nlocal0.*\t\t\t\t\t-/var/log/zeplic.log\n" >> /etc/rsyslog.conf ; fi
	@if [ -e "/etc/syslog.conf" ] && ! grep -q \!zeplic "/etc/syslog.conf" ; then sudo printf "\n\!zeplic\nlocal0.*\t\t\t\t\t-/var/log/zeplic.log\n" >> /etc/syslog.conf ; fi	
	@printf "done!"
	@printf "\nBuilding... "
#	@$(GOBUILD)
	@printf "done!"
	@printf "\nExporting your \$$\GOBIN... "
	@if [ -e "/root/.bashrc" ] && ! grep -q "$(GOPATH)/bin" "/root/.bashrc" ; then sudo printf "export PATH=\$$\PATH:$(GOPATH)/bin" >> ~/.bashrc ; fi
	@if [ -e "/root/.cshrc" ] && ! grep -q "$(GOPATH)/bin" "/root/.cshrc" ; then sudo printf "setenv PATH \"\$$\PATH\":$(GOPATH)/bin" >> ~/.cshrc ; fi
	@printf "done!\n\n"
	@printf "Remember to config your JSON file: /usr/local/etc/zeplic.d/config.json\n\n"

clean:
	@printf "\n:: ZEPLIC ::\n"
	@printf "\nCleaning dependencies... \c"
	@sudo rm -rf "$(GOPATH)/src/$(PACKAGE4)"
	@sudo rmdir "$(GOPATH)/src/$(PACKAGE4)" 2>/dev/null || :
	@sudo rm -rf "$(GOPATH)/src/$(PACKAGE3)"
	@sudo rmdir "$(GOPATH)/src/$(PACKAGE3)" 2>/dev/null || :
	@sudo rm -rf "$(GOPATH)/src/$(PACKAGE2)"
	@sudo rmdir "$(GOPATH)/src/$(PACKAGE2)" 2>/dev/null || :
	@sudo rm -rf "$(GOPATH)/src/$(PACKAGE1)"
	@sudo rmdir "$(GOPATH)/src/$(PACKAGE1)" 2>/dev/null || :
#	@rm -rf "$(GOPATH)/src/$(PACKAGE0)"
#	@rmdir "$(GOPATH)/src/$(PACKAGE0)" 2>/dev/null || :
	@printf "done!\n\n"
{'fraction_non_alphanumeric': 0.26128016789087094, 'fraction_numerical': 0.01217208814270724, 'mean_word_length': 3.539047619047619, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 29, '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': '2152375', 'n_tokens_mistral': 2182, 'n_tokens_neox': 2057, 'n_words': 419}