fixed the way to obtain package lists, mutualised debian familly conf, added separator

This commit is contained in:
2021-11-26 11:40:51 +01:00
parent 4fe284eb59
commit 6db50b3d69
7 changed files with 68 additions and 62 deletions

View File

@@ -15,11 +15,6 @@ export COM_UPGRADE="full-upgrade -y"
export COM_REMOVE="remove --purge -y"
export COM_AUTOREM="autoremove --purge -y"
export GET_INSTALLLIST="apt-get -s install @pkg@ -V | grep 'Inst' | awk '{print$2}'"
export GET_UPGRADELIST="apt-get -s full-upgrade -V | grep 'Inst' | awk '{print$2}'"
export GET_REMOVELIST="apt-get -s remove @pkg@ -V | grep 'Remv' | awk '{print$2}'"
export GET_AUTOREMLIST="apt-get -s autoremove -V | grep 'Remv' | awk '{print$2}'"
# Special variable for apt like tools to disable any interactive behaviour
# This is not used by init.sh
export DEBIAN_FRONTEND=noninteractive
@@ -34,3 +29,26 @@ export RC_SCRIPTS_PATH="/etc/init.d"
#export INIT_COM="systemctl %comm% %srv%"
# Init Upstart (plus ou moins universel)
export INIT_COM="service %srv% %com%"
get_install_list()
{
apt-get -s install $@ -V | grep "Inst" | awk '{print $2}'
}
get_upgrade_list()
{
apt-get -s full-upgrade -V | grep 'Inst' | awk '{print $2}'
}
get_remove_list()
{
apt-get -s remove $@ -V | grep 'Remv' | awk '{print $2}'
}
get_autorem_list()
{
apt-get -s autoremove -V | grep 'Remv' | awk '{print $2}'
}

View File

@@ -7,27 +7,10 @@
# https://opensource.org/licenses/BSD-3-Clause
# ------------------------------------------------------------------------------
# Conf gestionnaire de paquet
export PKG_MAN="apt-get"
export COM_INSTALL="install -y"
export COM_UPDATE="update"
export COM_UPGRADE="full-upgrade -y"
export COM_REMOVE="remove --purge -y"
export COM_AUTOREM="autoremove --purge -y"
# Everything declared for Debian works on Devuan...
. $MYPATH/conf/auto/debian.conf.sh
export GET_INSTALLLIST="apt-get -s install @pkg@ -V | grep 'Inst' | awk '{print$2}'"
export GET_UPGRADELIST="apt-get -s full-upgrade -V | grep 'Inst' | awk '{print$2}'"
export GET_REMOVELIST="apt-get -s remove @pkg@ -V | grep 'Remv' | awk '{print$2}'"
export GET_AUTOREMLIST="apt-get -s autoremove -V | grep 'Remv' | awk '{print$2}'"
# Special variable for apt tools to disable any interactive behaviour
# This is not used by init.sh
export DEBIAN_FRONTEND=noninteractive
# Conf chemin
export RC_SCRIPTS_PATH="/etc/init.d"
# Conf init
# Except init system :
# Init SystemV ou OpenRC:
export INIT_COM="$RC_SCRIPTS_PATH/%srv% %com%"
# Init Systemd:

View File

@@ -0,0 +1,11 @@
# ------------------------------------------------------------------------------
# Declaration specific to Linux Mint
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# ------------------------------------------------------------------------------
# This file is distributed under 3-clause BSD license.
# The complete license agreement can be obtained at:
# https://opensource.org/licenses/BSD-3-Clause
# ------------------------------------------------------------------------------
# Everything declared for Debian works on Linux Mint
. $MYPATH/conf/auto/debian.conf.sh

View File

@@ -7,30 +7,5 @@
# https://opensource.org/licenses/BSD-3-Clause
# ------------------------------------------------------------------------------
# Conf gestionnaire de paquet
export PKG_MAN="apt-get"
export COM_INSTALL="install -y"
export COM_UPDATE="update"
export COM_UPGRADE="full-upgrade -y"
export COM_REMOVE="remove --purge -y"
export COM_AUTOREM="autoremove --purge -y"
export GET_INSTALLLIST="apt-get -s install @pkg@ -V | grep 'Inst' | awk '{print$2}'"
export GET_UPGRADELIST="apt-get -s full-upgrade -V | grep 'Inst' | awk '{print$2}'"
export GET_REMOVELIST="apt-get -s remove @pkg@ -V | grep 'Remv' | awk '{print$2}'"
export GET_AUTOREMLIST="apt-get -s autoremove -V | grep 'Remv' | awk '{print$2}'"
# Special variable for apt tools to disable any interactive behaviour
# This is not used by init.sh
export DEBIAN_FRONTEND=noninteractive
# Conf chemin
export RC_SCRIPTS_PATH="/etc/init.d"
# Conf init
# Init SystemV ou OpenRC:
#export INIT_COM="$RC_SCRIPTS_PATH/%srv% %comm%"
# Init Systemd:
#export INIT_COM="systemctl %comm% %srv%"
# Init Upstart (plus ou moins universel)
export INIT_COM="service %srv% %com%"
# Everything declared for Debian works on Ubuntu
. $MYPATH/conf/auto/debian.conf.sh