<commit_before>#!/bin/bash -e
# -----------------------------------------------------------------------------
#
# Package	: go-i18n
# Version	: v1.10.0, v1.9.0
# Source repo	: https://github.com/nicksnyder/go-i18n
# Tested on	: ubi 8.5
# Language      : GO
# Travis-Check  : True
# Script License: Apache License, Version 2 or later
# Maintainer	: <NAME> <<EMAIL>>
#
# Disclaimer: This script has been tested in root mode on given
# ==========  platform using the mentioned version of the package.
#             It may not work as expected with newer versions of the
#             package and/or distribution. In such case, please
#             contact "Maintainer" of this script.
#
# ----------------------------------------------------------------------------

PACKAGE_NAME="go-i18n"
PACKAGE_VERSION=${1:-"v1.10.0"}
PACKAGE_URL="https://github.com/nicksnyder/go-i18n"
OS_NAME=$(grep ^PRETTY_NAME /etc/os-release | cut -d= -f2)

export GO_VERSION=${GO_VERSION:-"1.9"}
export GOROOT=${GOROOT:-"/usr/local/go"}
export GOPATH=${GOPATH:-$HOME/go}
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin:/usr/local/bin
PACKAGE_SOURCE_ROOT=$(awk -F '/' '{print  "/src/" $3 "/" $4;}' <<<"$PACKAGE_URL" | xargs printf "%s" "$GOPATH")
export PACKAGE_SOURCE_ROOT

echo "installing dependencies from system repo"
dnf install -y wget git -y >/dev/null

# installing golang
wget https://golang.org/dl/go"$GO_VERSION".linux-ppc64le.tar.gz
tar -C /usr/local/ -xzf go"$GO_VERSION".linux-ppc64le.tar.gz
rm -f go"$GO_VERSION".linux-ppc64le.tar.gz

#installing packages dependencies from source
git clone https://github.com/pelletier/go-toml "$GOPATH"/src/github.com/pelletier/go-toml
cd "$GOPATH"/src/github.com/pelletier/go-toml
git checkout 5ccdfb18c776b740aecaf085c4d9a2779199c279
git clone https://github.com/go-yaml/yaml "$GOPATH"/src/gopkg.in/yaml.v2
cd "$GOPATH"/src/gopkg.in/yaml.v2
git checkout 7649d4548cb53a614db133b2a8ac1f31859dda8c
git clone -q https://github.com/pelletier/go-buffruneio "$GOPATH"/src/github.com/pelletier/go-buffruneio<commit_msg>the previous script is working for the new version (#1865)<commit_after>#!/bin/bash -e
# -----------------------------------------------------------------------------
#
# Package	: go-i18n
# Version	: v1.10.0, v1.9.0, v1.10.1
# Source repo	: https://github.com/nicksnyder/go-i18n
# Tested on	: ubi 8.5
# Language      : GO
# Travis-Check  : True
# Script License: Apache License, Version 2 or later
# Maintainer	: <NAME> <<EMAIL>>
#
# Disclaimer: This script has been tested in root mode on given
# ==========  platform using the mentioned version of the package.
#             It may not work as expected with newer versions of the
#             package and/or distribution. In such case, please
#             contact "Maintainer" of this script.
#
# ----------------------------------------------------------------------------

PACKAGE_NAME="go-i18n"
PACKAGE_VERSION=${1:-"v1.10.1"}
PACKAGE_URL="https://github.com/nicksnyder/go-i18n"
OS_NAME=$(grep ^PRETTY_NAME /etc/os-release | cut -d= -f2)

export GO_VERSION=${GO_VERSION:-"1.9"}
export GOROOT=${GOROOT:-"/usr/local/go"}
export GOPATH=${GOPATH:-$HOME/go}
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin:/usr/local/bin
PACKAGE_SOURCE_ROOT=$(awk -F '/' '{print  "/src/" $3 "/" $4;}' <<<"$PACKAGE_URL" | xargs printf "%s" "$GOPATH")
export PACKAGE_SOURCE_ROOT

echo "installing dependencies from system repo"
dnf install -y wget git -y >/dev/null

# installing golang
wget https://golang.org/dl/go"$GO_VERSION".linux-ppc64le.tar.gz
tar -C /usr/local/ -xzf go"$GO_VERSION".linux-ppc64le.tar.gz
rm -f go"$GO_VERSION".linux-ppc64le.tar.gz

#installing packages dependencies from source
git clone https://github.com/pelletier/go-toml "$GOPATH"/src/github.com/pelletier/go-toml
cd "$GOPATH"/src/github.com/pelletier/go-toml
git checkout 5ccdfb18c776b740aecaf085c4d9a2779199c279
git clone https://github.com/go-yaml/yaml "$GOPATH"/src/gopkg.in/yaml.v2
cd "$GOPATH"/src/gopkg.in/yaml.v2
git checkout 7649d4548cb53a614db133b2a8ac1f31859dda8c
git clone -q https://github.com/pelletier/go-buffruneio "$GOPATH"/src/github.com/pelletier/go-buffruneio
{'fraction_non_alphanumeric': 0.21768707482993196, 'fraction_numerical': 0.043245869776482024, 'mean_word_length': 2.947267497603068, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 11, 'https://': 12, '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': '3838871', 'n_tokens_mistral': 1604, 'n_tokens_neox': 1476, 'n_words': 317}