2
1
Fork 0
mirror of https://git.savannah.gnu.org/git/gnuboot.git synced 2025-01-09 09:07:40 +01:00
gnuboot/resources/packages/dependencies/install
Denis 'GNUtoo' Carikli dbdeb37326
dependencies: rename ubuntu2004 in trisquel-10.
We can't require contributors to install Ubuntu as it has freedom
issues[1] but for contributors, installing Trisquel is easier since
it's at least FSDG compliant[2]. So it makes sense to show that
Trisquel is the primary target here.

This is also reflected in the reality as the current GNU Boot
maintainers already installed Trisquel 10 inside virtual machines
and/or containers to test this script.

[1]https://www.gnu.org/distros/common-distros.html#Ubuntu
[2]https://www.gnu.org/distros/free-distros.html

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-09 15:45:50 +01:00

60 lines
1.8 KiB
Bash
Executable file

#!/bin/sh
# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "$(dirname $0)"/../../scripts/misc/sysexits.sh
true=0
false=1
progname="resources/packages/dependencies/install"
usage()
{
progname="$1"
printf "Usage:\n"
printf "\t%s --help\n" \ "${progname}"
printf "\t%s # Install dependencies for GNU Boot\n" \ "${progname}"
}
is_base_distro()
{
grep "ID=${distro}" /etc/os-release > /dev/null && return ${true}
grep "ID_LIKE=${distro}" /etc/os-release > /dev/null && return ${true}
return ${false}
}
if [ $# -eq 1 ] && [ "$1" == "--help" ] ; then
usage "${progname}"
exit 0
else
usage "${progname}"
exit ${EX_USAGE}
fi
if is_base_distro "arch" ; then
"$(dirname $0)"/../dependencies/arch $@
elif is_base_distro "debian" ; then
"$(dirname $0)"/../dependencies/debian $@
elif is_base_distro "fedora" ; then
"$(dirname $0)"/../dependencies/fedora35 $@
elif is_base_distro "pureos" ; then # PureOS doesn't have ID_LIKE
"$(dirname $0)"/../dependencies/debian $@
elif is_base_distro "ubuntu" ; then
"$(dirname $0)"/../dependencies/trisquel-10 $@
elif is_base_distro "void" ; then
"$(dirname $0)"/../dependencies/void $@
fi