<commit_before>#!/bin/bash
function print_help_msg() {
	cat <<-EOF
	Usage: install.sh TARGET
	TARGET := { all,
				nogui
				android_studio_canary
				android_studio_release
				autorandr
				compton
				dconf
				dunst
				bash
				gdb
				git
				gtk
				i3-gaps
				ideavim
				intellij_idea
				kitty
				polybar
				pycharm
				qt
				ranger
				readline
				redshift
				rider
				rofi
				terminator
				tmux
				vim
				neovim
				scripts
				vimiv
				vrapper
				webstorm
				zathura
				zsh
				X
			}
EOF
}

function get_distribution_name() {
	IFS="="
	read -a test < /etc/os-release
	echo "${test[1]:1:-1}"
}

function get_packager_cmd() {
	case "$(get_distribution_name)" in
		"Arch Linux" )
			if yay_location="$(type -p yay)" && [ -n "$yay_location" ]; then
				echo "yay -S"
				return 0
			elif trizen_location="$(type -p trizen)" && [ -n "$trizen_location" ]; then
				echo "trizen -S"
				return 0
			elif yaourt_location="$(type -p yaourt)" && [ -n "$yaourt_location" ]; then
				echo "yaourt -S"
				return 0
			elif pacman_location="$(type -p pacman)" && [ -n "$pacman_location" ]; then
				echo "sudo pacman -S"
				return 0
			fi
			;;
	esac
	echo ""
	return 1
}

function get_package_list() {
	TARGET="$1"
	case "$(get_distribution_name)" in
		"Arch Linux")
			case $TARGET in
				autorandr )
					echo "autorandr-git"
					return 0
					;;
				compton )
					echo "compton"
					return 0
					;;
				dconf )
					echo "dconf"
					return 0
					;;
				dunst )
					echo "dunst"
					return 0
					;;
				bash )
					echo "bash"
					return 0
					;;
				gdb )
					echo "gdb"
					return 0
					;;
				git )
					echo "git"
					return 0
					;;
				gtk )
					echo "gtk3 gtk2 arc-gtk-theme papirus-icon-theme"
					return 0
					;;
				i3-gaps )
					echo "i3-gaps light-locker dmenu rofi compton feh autorandr-git udevil gnome-keyring libnotify xdotool imagemagick playerctl network-manager-applet insync polkit polkit-gnome xdg-user-dirs python python-rofi i3ipc-python rofimoji-git"
					return 0
					;;
				ideavim )
					echo ""
					return 1
					;;
				kitty )
					echo "kitty"
					;;
				polybar )
					echo "polybar xorg-xbacklight jq nerd-fonts-complete ttf-material-icons playerctl wireless_tools"
					return 0
					;;
				qt )
					echo "qt4 qt5-base qt5ct"
					;;
				ranger )
					echo "ranger"
					return 0
					;;
				readline )
					echo "readline"
					return 0
					;;
				redshift )
					echo "redshift"
					return 0
					;;
				rofi )
					echo "rofi ttf-dejavu"
					return 0
					;;
				terminator )
					echo "terminator ttf-inconsolata"
					return 0
					;;
				tmux )
					echo "tmux"
					return 0
					;;
				vim )
					echo "gvim ack fzf the_silver_searcher universal-ctags-git vim-spell-de"
					return 0
					;;
				neovim )
					echo "neovim"
					return 0
					;;
				vimiv )
					echo "vimiv"
					return 0
					;;
				zathura )
					echo "zathura zathura-pdf-mupdf"
					return 0
					;;
				zsh )
					echo "zsh curl fzf the_silver_searcher exa lua z.lua fd"
					return 0
					;;
				X )
					echo "xorg-server xmodmap"
					return 0
					;;
			esac
			;;
	esac

	echo ""
	return 1
}

function install_packages() {
	local TARGET="$1"

	PACKAGER_COMMAND=$(get_packager_cmd)
	PACKAGES=$(get_package_list $TARGET)

	echo "Installing $PACKAGES with $PACKAGER_COMMAND"

	if [[ ! -z $PACKAGER_COMMAND ]] && [[ ! -z $PACKAGES ]]; then
		eval $PACKAGER_COMMAND $PACKAGES
	fi
}<commit_msg>install: Add bat as dependency for zsh<commit_after>#!/bin/bash
function print_help_msg() {
	cat <<-EOF
	Usage: install.sh TARGET
	TARGET := { all,
				nogui
				android_studio_canary
				android_studio_release
				autorandr
				compton
				dconf
				dunst
				bash
				gdb
				git
				gtk
				i3-gaps
				ideavim
				intellij_idea
				kitty
				polybar
				pycharm
				qt
				ranger
				readline
				redshift
				rider
				rofi
				terminator
				tmux
				vim
				neovim
				scripts
				vimiv
				vrapper
				webstorm
				zathura
				zsh
				X
			}
EOF
}

function get_distribution_name() {
	IFS="="
	read -a test < /etc/os-release
	echo "${test[1]:1:-1}"
}

function get_packager_cmd() {
	case "$(get_distribution_name)" in
		"Arch Linux" )
			if yay_location="$(type -p yay)" && [ -n "$yay_location" ]; then
				echo "yay -S"
				return 0
			elif trizen_location="$(type -p trizen)" && [ -n "$trizen_location" ]; then
				echo "trizen -S"
				return 0
			elif yaourt_location="$(type -p yaourt)" && [ -n "$yaourt_location" ]; then
				echo "yaourt -S"
				return 0
			elif pacman_location="$(type -p pacman)" && [ -n "$pacman_location" ]; then
				echo "sudo pacman -S"
				return 0
			fi
			;;
	esac
	echo ""
	return 1
}

function get_package_list() {
	TARGET="$1"
	case "$(get_distribution_name)" in
		"Arch Linux")
			case $TARGET in
				autorandr )
					echo "autorandr-git"
					return 0
					;;
				compton )
					echo "compton"
					return 0
					;;
				dconf )
					echo "dconf"
					return 0
					;;
				dunst )
					echo "dunst"
					return 0
					;;
				bash )
					echo "bash"
					return 0
					;;
				gdb )
					echo "gdb"
					return 0
					;;
				git )
					echo "git"
					return 0
					;;
				gtk )
					echo "gtk3 gtk2 arc-gtk-theme papirus-icon-theme"
					return 0
					;;
				i3-gaps )
					echo "i3-gaps light-locker dmenu rofi compton feh autorandr-git udevil gnome-keyring libnotify xdotool imagemagick playerctl network-manager-applet insync polkit polkit-gnome xdg-user-dirs python python-rofi i3ipc-python rofimoji-git"
					return 0
					;;
				ideavim )
					echo ""
					return 1
					;;
				kitty )
					echo "kitty"
					;;
				polybar )
					echo "polybar xorg-xbacklight jq nerd-fonts-complete ttf-material-icons playerctl wireless_tools"
					return 0
					;;
				qt )
					echo "qt4 qt5-base qt5ct"
					;;
				ranger )
					echo "ranger"
					return 0
					;;
				readline )
					echo "readline"
					return 0
					;;
				redshift )
					echo "redshift"
					return 0
					;;
				rofi )
					echo "rofi ttf-dejavu"
					return 0
					;;
				terminator )
					echo "terminator ttf-inconsolata"
					return 0
					;;
				tmux )
					echo "tmux"
					return 0
					;;
				vim )
					echo "gvim ack fzf the_silver_searcher universal-ctags-git vim-spell-de"
					return 0
					;;
				neovim )
					echo "neovim"
					return 0
					;;
				vimiv )
					echo "vimiv"
					return 0
					;;
				zathura )
					echo "zathura zathura-pdf-mupdf"
					return 0
					;;
				zsh )
					echo "zsh curl fzf the_silver_searcher exa lua z.lua fd bat"
					return 0
					;;
				X )
					echo "xorg-server xmodmap"
					return 0
					;;
			esac
			;;
	esac

	echo ""
	return 1
}

function install_packages() {
	local TARGET="$1"

	PACKAGER_COMMAND=$(get_packager_cmd)
	PACKAGES=$(get_package_list $TARGET)

	echo "Installing $PACKAGES with $PACKAGER_COMMAND"

	if [[ ! -z $PACKAGER_COMMAND ]] && [[ ! -z $PACKAGES ]]; then
		eval $PACKAGER_COMMAND $PACKAGES
	fi
}
{'fraction_non_alphanumeric': 0.10310021629416005, 'fraction_numerical': 0.01240086517664023, 'mean_word_length': 1.9666381522668948, 'pattern_counts': {'":': 0, '<': 9, '<?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': '4753474', 'n_tokens_mistral': 3728, 'n_tokens_neox': 2582, 'n_words': 649}