<commit_before>#!/bin/sh

# TODO: common place
fatal()
{
    echo "FATAL: $*" >&2
    exit 1
}

PKGNAME=zoom

if [ "$1" = "--remove" ] ; then
    epm remove $PKGNAME
    exit
fi

[ "$1" != "--run" ] && echo "Install Zoom client from the official site" && exit

arch=$($DISTRVENDOR --distro-arch)
case $arch in
    x86_64|amd64)
        version=latest
        repack=''
        arch=$arch ;;
    i586|i386)
        version=5.4.53391.1108
        repack='--repack'
        arch=i686 ;;
    *)
        fatal "Unsupported arch $arch for $($DISTRVENDOR -d)"
esac

if [ "$($DISTRVENDOR -d)" = "ALTLinux" ] ; then
    epm install $repack https://zoom.us/client/$version/zoom_$arch.rpm
    exit
fi

# TODO: there are more complex distro dependent url
epm install "https://zoom.us/client/latest/zoom_$arch.$($DISTRVENDOR -p)"
<commit_msg>prescription.d/zoom.sh: repack always (ALT bug 40367)<commit_after>#!/bin/sh

# TODO: common place
fatal()
{
    echo "FATAL: $*" >&2
    exit 1
}

PKGNAME=zoom

if [ "$1" = "--remove" ] ; then
    epm remove $PKGNAME
    exit
fi

[ "$1" != "--run" ] && echo "Install Zoom client from the official site" && exit

repack='--repack'
arch=$($DISTRVENDOR --distro-arch)
case $arch in
    x86_64|amd64)
        version=latest
        arch=$arch ;;
    i586|i386)
        # latest does not work
        version=5.4.53391.1108
        arch=i686 ;;
    *)
        fatal "Unsupported arch $arch for $($DISTRVENDOR -d)"
esac

if [ "$($DISTRVENDOR -d)" = "ALTLinux" ] ; then
    epm install $repack https://zoom.us/client/$version/zoom_$arch.rpm
    exit
fi

# TODO: there are more complex distro dependent url
epm install "https://zoom.us/client/latest/zoom_$arch.$($DISTRVENDOR -p)"

{'fraction_non_alphanumeric': 0.1608925425719319, 'fraction_numerical': 0.03816793893129771, 'mean_word_length': 2.728665207877462, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2721767', 'n_tokens_mistral': 669, 'n_tokens_neox': 630, 'n_words': 158}