lib.sh dependencies: support --reinstall argument
./mk dependencies debian --reinstall Add --reinstall and it'll do: apt-get install --reinstall This can be useful when updating from a stable release to a testing release. The variable, "reinstall" can be configured for other distros, but it's currently only configured for Debian-based distros. Also, it can be anything. For example, you could add -y; however, a 4th argument will not be accepted. For example, you cannot do: ./mk dependencies debian --reinstall -y If you do this, it'll only see --reinstall; similarly, if you did this command: ./mk dependencies debian -y --reinstall then -y would be passed, but not --reinstall. This is an intentional design decision, in case you accidentally pasted or subshelled something that outputted something undesirable, to prevent possible abuse. Signed-off-by: Leah Rowe <leah@libreboot.org>20250107_branch
parent
33206cae60
commit
012f530656
|
@ -1,6 +1,6 @@
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
pkg_add="apt-get install"
|
pkg_add="apt-get install $reinstall"
|
||||||
pkglist=" \
|
pkglist=" \
|
||||||
acpica-tools autoconf autogen automake autopoint autotools-dev bc \
|
acpica-tools autoconf autogen automake autopoint autotools-dev bc \
|
||||||
binutils-arm-none-eabi bison build-essential cmake curl device-tree-compiler \
|
binutils-arm-none-eabi bison build-essential cmake curl device-tree-compiler \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
pkg_add="apt-get install"
|
pkg_add="apt-get install $reinstall"
|
||||||
pkglist=" \
|
pkglist=" \
|
||||||
autoconf autogen automake autopoint autotools-dev bc binutils-arm-none-eabi \
|
autoconf autogen automake autopoint autotools-dev bc binutils-arm-none-eabi \
|
||||||
bison build-essential cmake curl device-tree-compiler doxygen e2fsprogs efitools \
|
bison build-essential cmake curl device-tree-compiler doxygen e2fsprogs efitools \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
pkg_add="apt-get install"
|
pkg_add="apt-get install $reinstall"
|
||||||
pkglist=" \
|
pkglist=" \
|
||||||
autoconf autogen automake autopoint autotools-dev bc binutils-arm-none-eabi \
|
autoconf autogen automake autopoint autotools-dev bc binutils-arm-none-eabi \
|
||||||
bison build-essential cmake curl device-tree-compiler doxygen e2fsprogs efitools \
|
bison build-essential cmake curl device-tree-compiler doxygen e2fsprogs efitools \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
pkg_add="apt-get install"
|
pkg_add="apt-get install $reinstall"
|
||||||
pkglist=" \
|
pkglist=" \
|
||||||
autoconf autogen automake autopoint autotools-dev bc binutils-arm-none-eabi \
|
autoconf autogen automake autopoint autotools-dev bc binutils-arm-none-eabi \
|
||||||
bison build-essential cmake curl device-tree-compiler doxygen e2fsprogs efitools \
|
bison build-essential cmake curl device-tree-compiler doxygen e2fsprogs efitools \
|
||||||
|
|
|
@ -45,7 +45,7 @@ chkvars()
|
||||||
}
|
}
|
||||||
|
|
||||||
eval `setvars "" _nogit board xbmk_parent versiondate projectsite projectname \
|
eval `setvars "" _nogit board xbmk_parent versiondate projectsite projectname \
|
||||||
aur_notice configdir datadir version relname`
|
aur_notice configdir datadir version relname reinstall`
|
||||||
|
|
||||||
for fv in projectname projectsite version versiondate; do
|
for fv in projectname projectsite version versiondate; do
|
||||||
eval "[ ! -f "$fv" ] || read -r $fv < \"$fv\" || :"
|
eval "[ ! -f "$fv" ] || read -r $fv < \"$fv\" || :"
|
||||||
|
@ -72,6 +72,8 @@ e()
|
||||||
install_packages()
|
install_packages()
|
||||||
{
|
{
|
||||||
[ $# -lt 2 ] && $err "fewer than two arguments"
|
[ $# -lt 2 ] && $err "fewer than two arguments"
|
||||||
|
[ $# -gt 2 ] && reinstall="$3"
|
||||||
|
|
||||||
eval `setcfg "config/dependencies/$2"`
|
eval `setcfg "config/dependencies/$2"`
|
||||||
|
|
||||||
$pkg_add $pkglist || $err "Cannot install packages"
|
$pkg_add $pkglist || $err "Cannot install packages"
|
||||||
|
|
Loading…
Reference in New Issue