<commit_before>#!/bin/sh

#
# Create a RPM from last stable version or other if setted
# This script need have installed git, sed, rpmdevtools and curl
#
# Author: <NAME> <<EMAIL>>
#

# config
BRANCH=stable
REPO="https://github.com/roramirez/qpanel.git"
URL_STABLE_VERSION="https://raw.githubusercontent.com/roramirez/qpanel/$BRANCH/VERSION"

if ! [ -x "$(command -v git)" ]; then
  echo "Please install git"
  exit 1
fi

if ! [ -x "$(command -v rpmdev-setuptree)" ]; then
  echo "Please install rpm-build and rpmdevtools"
  exit 1
fi

if ! [ -x "$(command -v curl)" ]; then
  echo "Please install curl"
  exit 1
fi


VERSION_STABLE=$(curl $URL_STABLE_VERSION)
CLONE_DIR="/tmp/qpanel-$VERSION_STABLE"
FILE_TAR="qpanel-$VERSION_STABLE.tar.gz"
if [ -d "$CLONE_DIR" ]; then
  cd $CLONE_DIR
  git pull
else
  git clone -b $BRANCH $REPO $CLONE_DIR
fi

cd $CLONE_DIR
git submodule init
git submodule update
pybabel compile -d translations

cd /tmp
tar  cvfz $FILE_TAR qpanel-$VERSION_STABLE

rpmdev-setuptree
cd
cp /tmp/$FILE_TAR rpmbuild/SOURCES
cd rpmbuild
cp $CLONE_DIR/samples/elastix/elastix-qpanel.spec elastix-qpanel.spec
sed -i s/"Version: *.*.*"/"Version: $VERSION_STABLE"/g  elastix-qpanel.spec
rpmbuild -v -bb elastix-qpanel.spec
<commit_msg>Change url from create_rpm_elastix<commit_after>#!/bin/sh

#
# Create a RPM from last stable version or other if setted
# This script need have installed git, sed, rpmdevtools and curl
#
# Author: Rodrig<NAME> <<EMAIL>>
#

# config
BRANCH=stable
REPO="https://github.com/roramirez/qpanel.git"
URL_STABLE_VERSION="https://rodrigoramirez.com/qpanel/version/$BRANCH"

if ! [ -x "$(command -v git)" ]; then
  echo "Please install git"
  exit 1
fi

if ! [ -x "$(command -v rpmdev-setuptree)" ]; then
  echo "Please install rpm-build and rpmdevtools"
  exit 1
fi

if ! [ -x "$(command -v curl)" ]; then
  echo "Please install curl"
  exit 1
fi


VERSION_STABLE=$(curl -L $URL_STABLE_VERSION)
CLONE_DIR="/tmp/qpanel-$VERSION_STABLE"
FILE_TAR="qpanel-$VERSION_STABLE.tar.gz"
if [ -d "$CLONE_DIR" ]; then
  cd $CLONE_DIR
  git pull
else
  git clone -b $BRANCH $REPO $CLONE_DIR
fi

cd $CLONE_DIR
git submodule init
git submodule update
pybabel compile -d translations

cd /tmp
tar  cvfz $FILE_TAR qpanel-$VERSION_STABLE

rpmdev-setuptree
cd
cp /tmp/$FILE_TAR rpmbuild/SOURCES
cd rpmbuild
cp $CLONE_DIR/samples/elastix/elastix-qpanel.spec elastix-qpanel.spec
sed -i s/"Version: *.*.*"/"Version: $VERSION_STABLE"/g  elastix-qpanel.spec
rpmbuild -v -bb elastix-qpanel.spec

{'fraction_non_alphanumeric': 0.1272437175907459, 'fraction_numerical': 0.0023932987634623054, 'mean_word_length': 4.313559322033898, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3731360', 'n_tokens_mistral': 1004, 'n_tokens_neox': 949, 'n_words': 260}