<commit_before>#!/bin/bash

# <NAME> (<EMAIL>)

# INSTALL CUSTOM SCRIPTS
# Install scrips and customized executables

# Usage:
# install-scripts.sh -i <PATH>
# install-scripts.sh -r

key="$1"

install_scripts()
{
	SCRIPTDIR=$1
	echo "  - Installing user scripts"
	cp -f "$SCRIPTDIR"/bin/upgrade-gaph-host /usr/bin
	cp -f "$SCRIPTDIR"/bin/debug-gaph-host /usr/bin

	# Nomes alternativos
	ln -sf /usr/bin/upgrade-gaph-host /usr/bin/gaph-host-upgrade
	ln -sf /usr/bin/debug-gaph-host   /usr/bin/gaph-host-debug

	# SSH login info
	cp -f "$SCRIPTDIR"/etc/update-motd.d/99-gaph-banner.sh /etc/update-motd.d/
	sed '/99-gaph-banner.sh/' /etc/update-motd.d/00-header
	echo "/etc/update-motd.d/99-gaph-banner.sh" >> /etc/update-motd.d/00-header
}

remove_scripts()
{
	echo "  - Removing user scripts"
	rm -rf /usr/bin/upgrade-gaph-host
	rm -rf /usr/bin/gaph-host-upgrade
	rm -rf /usr/bin/debug-gaph-host
	rm -rf /usr/bin/gaph-host-debug

	# SSH Info
	rm -rf /etc/update-motd.d/99-gaph-banner.sh
	sed '/99-gaph-banner.sh/d' /etc/update-motd.d/00-header
}

case $key in

	-i|--install)
	SCRIPTDIR="$2"<commit_msg>Fixing sed<commit_after>#!/bin/bash

# <NAME> (<EMAIL>)

# INSTALL CUSTOM SCRIPTS
# Install scrips and customized executables

# Usage:
# install-scripts.sh -i <PATH>
# install-scripts.sh -r

key="$1"

install_scripts()
{
	SCRIPTDIR=$1
	echo "  - Installing user scripts"
	cp -f "$SCRIPTDIR"/bin/upgrade-gaph-host /usr/bin
	cp -f "$SCRIPTDIR"/bin/debug-gaph-host /usr/bin

	# Nomes alternativos
	ln -sf /usr/bin/upgrade-gaph-host /usr/bin/gaph-host-upgrade
	ln -sf /usr/bin/debug-gaph-host   /usr/bin/gaph-host-debug

	# SSH login info
	cp -f "$SCRIPTDIR"/etc/update-motd.d/99-gaph-banner.sh /etc/update-motd.d/
	echo "/etc/update-motd.d/99-gaph-banner.sh" >> /etc/update-motd.d/00-header
}

remove_scripts()
{
	echo "  - Removing user scripts"
	rm -rf /usr/bin/upgrade-gaph-host
	rm -rf /usr/bin/gaph-host-upgrade
	rm -rf /usr/bin/debug-gaph-host
	rm -rf /usr/bin/gaph-host-debug

	# SSH Info
	rm -rf /etc/update-motd.d/99-gaph-banner.sh
	sed '/99-gaph-banner.sh/d' /etc/update-motd.d/00-header
}

case $key in

	-i|--install)
	SCRIPTDIR="$2"
{'fraction_non_alphanumeric': 0.17762237762237762, 'fraction_numerical': 0.015850815850815853, 'mean_word_length': 3.0721062618595827, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, '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': '2103155', 'n_tokens_mistral': 1010, 'n_tokens_neox': 967, 'n_words': 167}