tis-ripgrep-portable icon

RipGre

Paquet d’installation silencieuse pour RipGre

14.1.1-1

  • package: tis-ripgrep-portable
  • name: RipGre
  • version: 14.1.1-1
  • maintainer: Jordan ARNAUD
  • target_os: darwin
  • architecture: x64
  • signature_date:
  • size: 2.09 Mo

package           : tis-ripgrep-portable
version           : 14.1.1-1
architecture      : x64
section           : base
priority          : optional
name              : RipGre
categories        : 
maintainer        : Jordan ARNAUD
description       : rga is an online search tool that allows you to search for a regular expression in a multitude of file types
depends           : 
conflicts         : 
maturity          : PROD
locale            : 
target_os         : darwin
min_wapt_version  : 
sources           : 
installed_size    : 
impacted_process  : 
description_fr    : rga est un outil de recherche orienté ligne qui vous permet de rechercher une expression régulière dans une multitude de types de fichiers
description_pl    : rga to narzędzie do wyszukiwania online, które umożliwia wyszukiwanie wyrażeń regularnych w szerokiej gamie typów plików
description_de    : rga ist ein online-orientiertes Suchwerkzeug, mit dem Sie in einer Vielzahl von Dateitypen nach einem regulären Ausdruck suchen können
description_es    : rga es una herramienta de búsqueda en línea que le permite buscar una expresión regular en una amplia gama de tipos de archivo
description_pt    : O rga é uma ferramenta de pesquisa online que lhe permite procurar uma expressão regular numa vasta gama de tipos de ficheiros
description_it    : rga è uno strumento di ricerca online che consente di cercare un'espressione regolare in un'ampia gamma di tipi di file
description_nl    : rga is een online zoekprogramma waarmee je kunt zoeken naar een reguliere uitdrukking in een groot aantal bestandstypen
description_ru    : rga - это инструмент онлайн-поиска, позволяющий искать регулярные выражения в файлах самых разных типов
audit_schedule    : 
editor            : 
keywords          : 
licence           : 
homepage          : 
package_uuid      : 6d0db135-2c98-4da4-b146-7c5dbfc42667
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : 5005ab036c49d4d00c52cfdb72c778f1f1324c3f767f98f94ed5eda9afd5a159
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2024-09-14T03:07:56.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : DvAVPTpaGggF66YsUsX76csvzXdPmuOJCMJ2By9bagefDgm7LxfkGHUYMsbtxf1alVGM5kHSV9DfOBk2QWppcw6eFGGtpX2dCkq8ME6IJpI4GyXN0GhjgIsB+bIxhtcmvEjDRHpn9pyQLmjobK2BJemAjWkyIYq9fz7kfV9TGBCxHp/gHs5kft3aGNLJbFf8RM0fAmXl8zxIQBrAjeUR0pICTDdT+hsbXU9VCFKk6kdQ61q3rrq9YhqX48pAvqYyzJAbR0YhctVCCCg5VOOC4bN0LK+Tz+VN87Z4KZoVKpXCUvAOAfxYXjeSHQOGTFFQXLT7iPsDHRw9tfyfTqeiZg==

# -*- coding: utf-8 -*-
##################################################
# This file is part of WAPT Enterprise
# All right reserved, (c) Tranquil IT Systems 2023
# For more information please refer to
# https://wapt.tranquil.it/store/licences.html
##################################################
from setuphelpers import *

from setuphelpers import *


bin_path = makepath("/", "usr", "local", "bin")
app_path = "/opt/rg"

def install():
    # Extraction and copying to /opt/typst
    extract_path = glob.glob("*.tar.gz")[0]
    run(f"tar -xzvf {extract_path}")
    char_len = len(extract_path) - len('.tar.gz')
    extract_path = extract_path[:char_len]
    bin_name = os.path.join(extract_path, "rg")
    print(f"copying ripgrep to {app_path}")
    if not isdir(app_path):
        mkdirs(app_path)
    filecopyto(bin_name, app_path)
    # Creation of symlink
    if not isfile(f"{bin_path}/rg"):
        print("create rg alias in path")
        os.symlink(f"{app_path}/rg", f"{bin_path}/rg")
    if isdir(extract_path):
        remove_tree(extract_path)

def uninstall():
    # Removing of symlink
    if isfile(f"{bin_path}/rg"):
        remove_file(f"{bin_path}/rg")
    # Removing of the software 
    if isdir(app_path):
        remove_tree(app_path)

from setuphelpers import *
import requests
import re
import json

def update_package():
    # Déclarer les variables locales
    result = False
    proxies = get_proxies()
    if not proxies:
        proxies = get_proxies_from_wapt_console()
    git_repo = "BurntSushi/ripgrep"
    dict_arch ={
        "x64":"x86_64-apple-darwin.tar.gz",
        "x86": "-686-pc-windows-msvc"
    }
    url_api = f"https://api.github.com/repos/{git_repo}/releases/latest"
    
    # Getting latest version information from official sources
    print("API used is: %s" % url_api)
    json_load = json.loads(wgets(url_api, proxies=proxies))

    for download in json_load["assets"]:
        if download["browser_download_url"].endswith('.tar.gz') and dict_arch[control.architecture] in download["browser_download_url"]:
            url_dl = download["browser_download_url"]
            version = json_load["tag_name"].replace("v","")
            filename = download["name"]
            break

    if not isfile(filename):
        package_updated = True
        wget(url_dl,filename,proxies=proxies)

    #nettoyer les fichiers temporaires
    for f in glob.glob('*.tar.gz'):
        if f != filename:
            remove_file(f)
    
    control.set_software_version(version)
    control.save_control_to_wapt()

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
c5c5482e9e619e640ba6b216bfe7e2fc57328f5c58011febe7e23f205b169773 : WAPT/control
5005ab036c49d4d00c52cfdb72c778f1f1324c3f767f98f94ed5eda9afd5a159 : WAPT/icon.png
4e188584af18bae6e194c0a83481ff668af5d859c1b00a51554bb4bc113ee8f4 : luti.json
fc87e78f7cb3fea12d69072e7ef3b21509754717b746368fd40d88963630e2b3 : ripgrep-14.1.1-x86_64-apple-darwin.tar.gz
6e30da0059edd06348466bc8841ec88a21b611255aeb6975b00f940c6a1e3b05 : setup.py
883ad2f802f95f38e4a5376233f367956fbe4311bf84c3ee6e2dc55a886cabf0 : update_package.py