add parameter and update usage

This commit is contained in:
Tobias Powalowski 2024-08-01 10:27:47 +02:00
parent 772934b9ba
commit 6e1e13738e
2 changed files with 13 additions and 4 deletions

View file

@ -2,6 +2,15 @@
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
# created by Tobias Powalowski <tpowa@archlinux.org> # created by Tobias Powalowski <tpowa@archlinux.org>
. /usr/lib/archboot/common.sh . /usr/lib/archboot/common.sh
_usage () {
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Check not installed packages\e[m"
echo -e "\e[1m---------------------------------------\e[m"
echo "Check the system for uninstalled packages with pacman."
echo ""
echo -e "Usage: \e[1m${_BASENAME} run\e[m"
exit 0
}
[[ -z "${1}" || "${1}" != "run" ]] && _usage
_archboot_check _archboot_check
# consider only license package and locale as uninstalled # consider only license package and locale as uninstalled
# it's hard to track manually changes in systemd files # it's hard to track manually changes in systemd files

View file

@ -6,11 +6,11 @@ _LOOP="/dev/loop0"
_IMG="/test.img" _IMG="/test.img"
_PASS="/passphrase" _PASS="/passphrase"
_usage () { _usage () {
echo -e "\e[1mTestsuite for Archboot Environment\e[m" echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Testsuite\e[m"
echo -e "\e[1m---------------------------------------------\e[m" echo -e "\e[1m--------------------\e[m"
echo "Run automatic tests to detect errors/changes." echo "Run automatic tests to detect errors/changes."
echo "" echo ""
echo -e "usage: \e[1m${_BASENAME} run\e[m" echo -e "Usage: \e[1m${_BASENAME} run\e[m"
exit 0 exit 0
} }
_run_test () { _run_test () {
@ -168,7 +168,7 @@ _result pacman-error.log
echo -e "Starting pacman database check in \e[1m10\e[m seconds... \e[1;92mCTRL-C\e[m to stop now." echo -e "Starting pacman database check in \e[1m10\e[m seconds... \e[1;92mCTRL-C\e[m to stop now."
sleep 10 sleep 10
_run_test "pacman database... this takes a while" _run_test "pacman database... this takes a while"
archboot-not-installed.sh &>>"${_LOG}" archboot-not-installed.sh run &>>"${_LOG}"
_result not-installed.log _result not-installed.log
echo -e "\e[1mResult:\e[m" echo -e "\e[1mResult:\e[m"
if [[ -z "${_TEST_FAIL}" ]]; then if [[ -z "${_TEST_FAIL}" ]]; then