<commit_before>#!/bin/sh

# Define the latest version
VERSION="0.0.2beta"
readonly VERSION

#####################################################################
# Check if a command with the name 'push' already exists on the
# system. Will exit with an error if it is not ours.
#####################################################################
# 'Our' push command should write to the stderr
#checker=$(push --unknown 2>&1 >/dev/null)
#echo $checker
#
#if (echo "$checker" | grep -q "flag provided but not defined: -unknown"); then
#    echo "Installing 'push'"
#else
#    echo "Error: could not install 'push'" 1>&2
#    echo "A 'push' command already exists in $(which push)" 1>&2
#	exit 1
#fi;


#####################################################################
# 1. Download to a temporary file
#    GitHub redirects to S3 (-L follows redirects)
# 2. Move & fix exec rights
#####################################################################

case "$(uname -s)" in
    Darwin)
        echo 'Mac OS X'
        temp_file=$(mktemp)
        curl -o "$temp_file" -L https://github.com/lukin0110/push/releases/download/$VERSION/push.x86.darwin
        mv "$temp_file" /usr/local/bin/push
        chmod 755 /usr/local/bin/push
        echo "Installed in /usr/local/bin/push"
    ;;

    Linux)
        temp_file=$(mktemp)
        arch=$(uname -p)
        if [ "$arch" = "unknown" ]; then
            arch="x86"
        fi;

        echo "Installing on Linux $arch"
        curl -o "$temp_file" -L https://github.com/lukin0110/push/releases/download/$VERSION/push.$arch.linux
        mv "$temp_file" /usr/local/bin/push
        chmod 755 /usr/local/bin/push
        echo "Installed in /usr/local/bin/push"
    ;;

    *)
        echo 'other OS'
        echo 'Not supported ... yet. Open an issue on https://github.com/lukin0110/push/issues'
    ;;<commit_msg>fixed x86_64 arch<commit_after>#!/bin/sh

# Define the latest version
VERSION="0.0.2beta"
readonly VERSION

#####################################################################
# Check if a command with the name 'push' already exists on the
# system. Will exit with an error if it is not ours.
#####################################################################
# 'Our' push command should write to the stderr
#checker=$(push --unknown 2>&1 >/dev/null)
#echo $checker
#
#if (echo "$checker" | grep -q "flag provided but not defined: -unknown"); then
#    echo "Installing 'push'"
#else
#    echo "Error: could not install 'push'" 1>&2
#    echo "A 'push' command already exists in $(which push)" 1>&2
#	exit 1
#fi;


#####################################################################
# 1. Download to a temporary file
#    GitHub redirects to S3 (-L follows redirects)
# 2. Move & fix exec rights
#####################################################################

case "$(uname -s)" in
    Darwin)
        echo 'Mac OS X'
        temp_file=$(mktemp)
        curl -o "$temp_file" -L https://github.com/lukin0110/push/releases/download/$VERSION/push.x86.darwin
        mv "$temp_file" /usr/local/bin/push
        chmod 755 /usr/local/bin/push
        echo "Installed in /usr/local/bin/push"
    ;;

    Linux)
        temp_file=$(mktemp)
        arch=$(uname -p)
        if [ "$arch" = "unknown" ]; then
            arch="x86"
        fi;
        if [ "$arch" = "x86_64" ]; then
            arch="x86"
        fi;

        echo "Installing on Linux $arch"
        curl --fail -o "$temp_file" -L https://github.com/lukin0110/push/releases/download/$VERSION/push.$arch.linux
        mv "$temp_file" /usr/local/bin/push
        chmod 755 /usr/local/bin/push
        echo "Installed in /usr/local/bin/push"
    ;;

    *)
        echo 'other OS'
        echo 'Not supported ... yet. Open an issue on https://github.com/lukin0110/push/issues'
    ;;
{'fraction_non_alphanumeric': 0.26322682032477734, 'fraction_numerical': 0.020953378732320588, 'mean_word_length': 2.965732087227414, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '589974', 'n_tokens_mistral': 1220, 'n_tokens_neox': 1114, 'n_words': 341}