Only Stretch or Buster

This commit is contained in:
Maniack Crudelis 2020-04-29 23:57:50 +02:00
parent 850beb84d1
commit eb5d48d6a3
3 changed files with 12 additions and 0 deletions

View file

@ -40,6 +40,8 @@ Si ce fichier n'est pas présent, package_check sera utilisé en mode dégradé.
--- ---
## Déploiement de package_check ## Déploiement de package_check
Package_check ne peut être installer que sur Debian Stretch ou Debian Buster.
``` ```
git clone https://github.com/YunoHost/package_check git clone https://github.com/YunoHost/package_check
package_check/sub_scripts/lxc_build.sh package_check/sub_scripts/lxc_build.sh

View file

@ -40,6 +40,8 @@ If this file is not present, package_check will be used in downgraded mode. It w
--- ---
## Deploying package_check ## Deploying package_check
Package_check can only be installed on Debian Stretch or Debian Buster.
``` ```
git clone https://github.com/YunoHost/package_check git clone https://github.com/YunoHost/package_check
package_check/sub_scripts/lxc_build.sh package_check/sub_scripts/lxc_build.sh

View file

@ -1,5 +1,13 @@
#!/bin/bash #!/bin/bash
# Check Debian Stretch or Buster
host_codename=$(grep "VERSION_CODENAME" /etc/os-release | cut -d= -f2)
if [ "$host_codename" != "stretch" ] && [ "$host_codename" != "buster" ]
then
echo "Package_check can only be installed on Debian Stretch or Debian Buster..."
exit 1
fi
# Récupère le dossier du script # Récupère le dossier du script
if [ "${0:0:1}" == "/" ]; then script_dir="$(dirname "$0")"; else script_dir="$(echo $PWD/$(dirname "$0" | cut -d '.' -f2) | sed 's@/$@@')"; fi if [ "${0:0:1}" == "/" ]; then script_dir="$(dirname "$0")"; else script_dir="$(echo $PWD/$(dirname "$0" | cut -d '.' -f2) | sed 's@/$@@')"; fi