Helpers fixes

This commit is contained in:
Anthony Axenov 2024-11-22 09:31:53 +08:00
parent a71b682f49
commit 1c2abec8a7
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC

View File

@ -9,7 +9,7 @@ installed2() {
} }
apt_install() { apt_install() {
sudo apt install -y --autoremove "$*" sudo apt install -y --autoremove $*
} }
require() { require() {
@ -21,7 +21,7 @@ require() {
done done
if [ ${#sw[@]} -gt 0 ]; then if [ ${#sw[@]} -gt 0 ]; then
info "This packages will be installed in your system:\n${sw[*]}" info "This packages will be installed in your system:\n${sw[*]}"
apt_install "${sw[*]}" apt_install ${sw[*]}
[ $? -gt 0 ] && die "installation cancelled" 201 [ $? -gt 0 ] && die "installation cancelled" 201
fi fi
} }