summaryrefslogtreecommitdiff
path: root/include/lib.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-12-30 21:53:55 +0000
committerLeah Rowe <leah@libreboot.org>2024-12-30 21:53:55 +0000
commitd3a732a64db0f40a90648106436097373225d00a (patch)
tree6a7a97530eb96681dc22cd2bdf882ef015ca2794 /include/lib.sh
parent466ada423ddabacd6d7c8488b32ca1812f134033 (diff)
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>
Diffstat (limited to 'include/lib.sh')
-rw-r--r--include/lib.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/lib.sh b/include/lib.sh
index 2c86e37d..4911c34f 100644
--- a/include/lib.sh
+++ b/include/lib.sh
@@ -45,7 +45,7 @@ chkvars()
}
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
eval "[ ! -f "$fv" ] || read -r $fv < \"$fv\" || :"
@@ -72,6 +72,8 @@ e()
install_packages()
{
[ $# -lt 2 ] && $err "fewer than two arguments"
+ [ $# -gt 2 ] && reinstall="$3"
+
eval `setcfg "config/dependencies/$2"`
$pkg_add $pkglist || $err "Cannot install packages"