<commit_before>#!/bin/bash

# set some printing colors
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;36m'
NC='\033[0m'

shell=$(basename $SHELL)
packagefound=false
if [ "$(which dnf)" != "" ] ; then
  packagefound=true
  sudo dnf -y copr enable karmab/kcli
  sudo dnf -y install kcli
  if [ "$?" != "0" ] ; then
    echo -e "${RED}Package installation didnt work(${NC}"
    exit 1
  fi
elif [ "$(which apt-get)" != "" ] ; then
  packagefound=true
  curl -1sLf https://dl.cloudsmith.io/public/karmab/kcli/cfg/setup/bash.deb.sh | sudo -E bash
  sudo apt-get update 
  sudo apt-get -y install python3-kcli
  if [ "$?" != "0" ] ; then
    echo -e "${RED}Package installation didnt work(${NC}"
    exit 1
  fi
fi

if [ "$packagefound" == "true" ] ; then
  echo -e "${GREEN}kcli installed${NC}"
  echo -e "${BLUE}Consider installing completion by following https://kcli.readthedocs.io/#auto-completion${NC}"
  exit 0
fi

engine=""
which docker >/dev/null 2>&1 && engine="docker"
which podman >/dev/null 2>&1 && engine="podman"
if [ "$engine" == "" ] ; then
  echo -e "${BLUE}No container engine found nor compatible package manager. Install podman or docker first${NC}"
  exit 1
fi

alias kcli >/dev/null 2>&1
ALIAS="$?"

if [ "$ALIAS" != "0" ]; then
  echo -e "${BLUE}Installing as alias for $engine${NC}"<commit_msg>extra info in install.sh<commit_after>#!/bin/bash

# set some printing colors
RED='\033[0;31m'
GREEN='\033[0;32m'
BLUE='\033[0;36m'
NC='\033[0m'

shell=$(basename $SHELL)
packagefound=false
if [ "$(which dnf)" != "" ] ; then
  packagefound=true
  echo -e "${BLUE}Installing using copr package(${NC}"
  sudo dnf -y copr enable karmab/kcli
  sudo dnf -y install kcli
  if [ "$?" != "0" ] ; then
    echo -e "${RED}Package installation didnt work(${NC}"
    exit 1
  fi
elif [ "$(which apt-get)" != "" ] ; then
  packagefound=true
  echo -e "${BLUE}Installing using deb package(${NC}"
  curl -1sLf https://dl.cloudsmith.io/public/karmab/kcli/cfg/setup/bash.deb.sh | sudo -E bash
  sudo apt-get update 
  sudo apt-get -y install python3-kcli
  if [ "$?" != "0" ] ; then
    echo -e "${RED}Package installation didnt work(${NC}"
    exit 1
  fi
fi

if [ "$packagefound" == "true" ] ; then
  echo -e "${GREEN}kcli installed${NC}"
  echo -e "${BLUE}Consider installing completion by following https://kcli.readthedocs.io/#auto-completion${NC}"
  exit 0
fi

engine=""
which docker >/dev/null 2>&1 && engine="docker"
which podman >/dev/null 2>&1 && engine="podman"
if [ "$engine" == "" ] ; then
  echo -e "${BLUE}No container engine found nor compatible package manager. Install podman or docker first${NC}"
  exit 1
else
  echo -e "${BLUE}Using engine $engine ${NC}"
fi

alias kcli >/dev/null 2>&1
ALIAS="$?"

if [ "$ALIAS" != "0" ]; then
  echo -e "${BLUE}Installing container alias ${NC}"
{'fraction_non_alphanumeric': 0.18090811583839828, 'fraction_numerical': 0.026456918126564175, 'mean_word_length': 3.758503401360544, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 4, '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': '1613963', 'n_tokens_mistral': 1104, 'n_tokens_neox': 1025, 'n_words': 298}