<commit_before>#!/bin/bash

if ! grep -Eq '(ID|ID_LIKE)=arch' /etc/os-release; then
	echo 'error: OS not supported' >&2
	exit 1
fi

yay --sync --needed neovim fzf git-delta fd ripgrep fisher nerd-fonts-hack<commit_msg>prepare: introduce support for Debian-based distros; add more packages<commit_after>#!/bin/bash

source /etc/os-release

function install_packages {
    case $1 in
    arch)
        pacman --sync --needed --noconfirm bat fd fish fisher fzf git-delta neovim psmisc python-pip ripgrep sqlite tree
        exit
        ;;
    debian)
        # `fisher` and `git-delta` are not in the official repos
        apt-get -y update && apt-get -y install bat fd-find fish fzf neovim psmisc python3-pip ripgrep sqlite3 tree &&
            ln -s /usr/bin/batcat /usr/local/bin/bat &&
            ln -s /usr/lib/cargo/bin/fd /usr/local/bin/fd &&
            ln -s /usr/bin/vim.tiny /usr/local/bin/vim
        exit
        ;;
    esac
}

install_packages "$ID"

for distro in $ID_LIKE; do
    install_packages "$distro"
done

echo 'error: OS not supported' >&2
exit 1
{'fraction_non_alphanumeric': 0.1130841121495327, 'fraction_numerical': 0.0065420560747663555, 'mean_word_length': 2.466019417475728, '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': '1937458', 'n_tokens_mistral': 397, 'n_tokens_neox': 371, 'n_words': 117}