<commit_before>#!/bin/bash
# shellcheck disable=SC1090
#Response for bad arguments or unsupported features
BADARG='The app you specified does not exist. Check the name again (note: it is case sensitive)'
NOARGSUPPORT='This app doesn''t support the '$1' option. Check the readme file for which operations are supported for each app.'

#Check for bad option and move on
if [[ $? -ne 0 ]]; then
    help;
fi

eval set -- "$ARGS";

#Nothing passed in so just blank the ARGS variable
if [[ $1 = '--' ]]; then
    ARGS=''
fi

#Options
while true; do
    case "$1" in
        -h|--help)
            shift;
            if [[ -n $1 ]]; then
                help
            fi
            ;;
        -i|--install)
            shift;
            if [[ -n $1 ]]; then
                install="$1";
                if [[ ! -f $SCRIPTPATH/$1/$1-installer.sh ]]; then
                    echo
                    echo
                    echo "$BADARG"
                    source "$SCRIPTPATH/inc/exit.sh"
                else
                    source "$SCRIPTPATH/$1/$1-constants.sh"
                    source "$SCRIPTPATH/$1/$1-installer.sh"
                fi
                shift;
            fi
            ;;
        -u|--uninstall)
            shift;
            if [[ -n $1 ]]; then
                uninstall="$1";
                if [[ ! -f $SCRIPTPATH/$1/$1-uninstaller.sh ]]; then
                    echo
                    echo
                    echo "$BADARG"
                    source "$SCRIPTPATH/inc/exit.sh"
                else
                    source "$SCRIPTPATH/$1/$1-constants.sh"
                    source "$SCRIPTPATH/$1/$1-uninstaller.sh"
                fi
                shift;
            fi
            ;;
        -b|--backup)
            shift;
            if [[ -n $1 ]]; then
                backup="$1";
                if [[ ! -f $SCRIPTPATH/$1/$1-constants.sh ]]; then
                    echo
                    echo<commit_msg>Can now install more utils apps straight from the command line<commit_after>#!/bin/bash
# shellcheck disable=SC1090
#Response for bad arguments or unsupported features
BADARG='The app you specified does not exist. Check the name again (note: it is case sensitive)'
NOARGSUPPORT='This app doesn''t support the '$1' option. Check the readme file for which operations are supported for each app.'

#Check for bad option and move on
if [[ $? -ne 0 ]]; then
    help;
fi

eval set -- "$ARGS";

#Nothing passed in so just blank the ARGS variable
if [[ $1 = '--' ]]; then
    ARGS=''
fi

#Options
while true; do
    case "$1" in
        -h|--help)
            shift;
            if [[ -n $1 ]]; then
                help
            fi
            ;;
        -i|--install)
            shift;
            if [[ -n $1 ]]; then
                install="$1";
                if [[ -f $SCRIPTPATH/$1/$1-installer.sh ]]; then
                    source "$SCRIPTPATH/$1/$1-constants.sh"
                    source "$SCRIPTPATH/$1/$1-installer.sh"
                elif [[ -f $SCRIPTPATH/utils/$1/$1-installer.sh ]]; then
                    if [[ -f $SCRIPTPATH/utils/$1/$1-constants.sh ]]; then
                        source "$SCRIPTPATH/utils/$1/$1-constants.sh"
                    fi
                    source "$SCRIPTPATH/utils/$1/$1-installer.sh"
                else
                    echo
                    echo
                    echo "$BADARG"
                    source "$SCRIPTPATH/inc/exit.sh"
                fi
                shift;
            fi
            ;;
        -u|--uninstall)
            shift;
            if [[ -n $1 ]]; then
                uninstall="$1";
                if [[ ! -f $SCRIPTPATH/$1/$1-uninstaller.sh ]]; then
                    echo
                    echo
                    echo "$BADARG"
                    source "$SCRIPTPATH/inc/exit.sh"
                else
                    source "$SCRIPTPATH/$1/$1-constants.sh"
                    source "$SCRIPTPATH/$1/$1-uninstaller.sh"
                fi
                shift;
            fi
            ;;
        -b|--backup)
            shift;
            if [[ -n $1 ]]; then
                backup="$1";
                if [[ ! -f $SCRIPTPATH/$1/$1-constants.sh ]]; then
                    echo
                    echo
{'fraction_non_alphanumeric': 0.12021475256769375, 'fraction_numerical': 0.015406162464985995, 'mean_word_length': 1.0953545232273838, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3267495', 'n_tokens_mistral': 1234, 'n_tokens_neox': 1185, 'n_words': 328}