This commit is contained in:
teldra 2022-02-09 15:22:00 +01:00
parent 673af9f17b
commit 156a4b53a5
2 changed files with 16 additions and 6 deletions

View File

@ -8,11 +8,13 @@ header() {
if [ "$DEBUG" -ge "1" ]; then
echo please enter enter
read a
if [ "$a" -ge "2" ]; then
set -x
fi
if [ "$a" == "0" ]; then
DEBUG=0
if [ "${a}" ]; then
if [ "$a" -ge "2" ]; then
set -x
fi
if [ "$a" == "0" ]; then
DEBUG=0
fi
fi
fi
clear

10
main.sh
View File

@ -376,8 +376,16 @@ add_arg_pkg() {
for i in "${@}"; do
if xbps-query -Rs ${i}|awk '{print $2}'|grep "^${i}" >/dev/null; then
addpkg "${@}"
else
na_pkg+=("${i}")
fi
done
if [ "${#na_pkg[@]}" -gt "0" ]; then
echo "package$(if [ ${#na_pkg[@]} -gt 1 ]; then printf "s"; fi) ${na_pkg[@]} not available"
if ! yesno "exit?" n; then
exit 1
fi
fi
}
target_phy_disk
@ -394,6 +402,7 @@ base
profile
network
printing
add_arg_pkg "${@}"
header "Do installation"
if [ "${DEBUG}" -ge "1" ]; then
@ -403,7 +412,6 @@ if ! yesno "Do you really wanna install?" n; then
exit
fi
add_arg_pkg "${@}"
do_partition
do_install