Commit 59be959f authored by Denis Bonnenfant's avatar Denis Bonnenfant
Browse files

reoganisation des dépendances

parent 58b453a5
#!/bin/bash
version="4.3."
version="4.4."
SSH="ssh -p 2222 root@deb.sambaedu.org"
......
sambaedu-wpkg (4.3.17) UNRELEASED; urgency=medium
sambaedu-wpkg (4.6.1) UNRELEASED; urgency=medium
[ Denis Bonnenfant ]
* Paquets stables
* Nouvelle version stable
* Nouvelle version stable
* Nouvelle version stable
* Nouvelle version stable avec support Bullseye
-- denis <denis@bureau> Thu, 01 Apr 2021 21:31:26 +0200
-- Denis Bonnenfant <denis.bonnenfant@sambaedu.org> Fri, 03 Sep 2021 12:34:36 +0200
sambaedu-wpkg (4.0.0~beta69) UNRELEASED; urgency=medium
......
sambaedu-wpkg_4.3.17_all.deb net extra
sambaedu-wpkg_4.3.17_amd64.buildinfo net extra
sambaedu-wpkg_4.6.1_all.deb net extra
sambaedu-wpkg_4.6.1_amd64.buildinfo net extra
<?php
/*
* génère la liste des paquets winget à installer sur le poste.
* le xml de l'application doit contenir le resultat de winget export pour l'application
* destiné à winget import
* aucune vérification n'est faite, on considère que winget sait faire...
*/
include "config.inc.php";
include ("wpkg_lib.php");
include ("wpkg_libsql.php");
include ("ldap.inc.php");
$nom_poste = $_GET["poste"] ?? $_POST["poste"] ?? "";
if (empty($nom_poste)) {
exit();
}
$liste_applications = array_map('strtolower', array_column(array_column(info_poste_applications($config, $nom_poste), "info_app"), "id_nom_app"));
$xml = new DOMDocument();
$xml->formatOutput = true;
$xml->preserveWhiteSpace = false;
$xml->load($url_packages);
$packages = $xml->documentElement->getElementsByTagName('package');
$liste = [];
foreach ($packages as $package) {
if (is_int(array_search(strtolower($package->getAttribute('id')), $liste_applications))) {
$variables = $package->getElementsByTagName("windows");
foreach ($variables as $variable) {
if ($variable->getAttribute('type') == "winget") {
$liste[] = $variable->getAttribute('package');
}
}
}
}
echo header('Content-type: text/json');
echo implode(" ", $liste);
?>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment