mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-08-13 08:22:22 +00:00
Update install utilities
This commit is contained in:
parent
53f29ec710
commit
8db57bda6e
@ -690,6 +690,24 @@ install_system_utils() {
|
||||
command -v "$1" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
|
||||
ensure_repositories() {
|
||||
local sources_file="/etc/apt/sources.list"
|
||||
local need_update=false
|
||||
|
||||
if ! grep -q "deb.*${OS_CODENAME}.*main" "$sources_file"; then
|
||||
echo "deb http://deb.debian.org/debian ${OS_CODENAME} main contrib non-free non-free-firmware" >> "$sources_file"
|
||||
need_update=true
|
||||
fi
|
||||
|
||||
if [ "$need_update" = true ] || ! apt list --installed >/dev/null 2>&1; then
|
||||
msg_info "$(translate "Updating package lists")..."
|
||||
apt update >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
install_single_package() {
|
||||
local package="$1"
|
||||
@ -806,12 +824,18 @@ install_system_utils() {
|
||||
show_proxmenux_logo
|
||||
msg_title "$SCRIPT_TITLE"
|
||||
msg_info2 "$(translate "Installing selected utilities")"
|
||||
|
||||
if ! ensure_repositories; then
|
||||
msg_error "$(translate "Failed to configure repositories. Installation aborted.")"
|
||||
return 1
|
||||
fi
|
||||
|
||||
msg_ok "$(translate "Update package list successful")"
|
||||
|
||||
local failed=0
|
||||
local success=0
|
||||
local warning=0
|
||||
|
||||
|
||||
local selected_array
|
||||
IFS=' ' read -ra selected_array <<< "$selected"
|
||||
|
||||
@ -876,6 +900,8 @@ install_system_utils() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
install_system_utils_() {
|
||||
|
||||
msg_info2 "$(translate "Installing common system utilities...")"
|
||||
|
@ -60,6 +60,24 @@ install_system_utils() {
|
||||
}
|
||||
|
||||
|
||||
ensure_repositories() {
|
||||
local sources_file="/etc/apt/sources.list"
|
||||
local need_update=false
|
||||
|
||||
if ! grep -q "deb.*${OS_CODENAME}.*main" "$sources_file"; then
|
||||
echo "deb http://deb.debian.org/debian ${OS_CODENAME} main contrib non-free non-free-firmware" >> "$sources_file"
|
||||
need_update=true
|
||||
fi
|
||||
|
||||
if [ "$need_update" = true ] || ! apt list --installed >/dev/null 2>&1; then
|
||||
msg_info "$(translate "Updating package lists")..."
|
||||
apt update >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
install_single_package() {
|
||||
local package="$1"
|
||||
local command_name="${2:-$package}"
|
||||
@ -184,6 +202,13 @@ install_system_utils() {
|
||||
clear
|
||||
show_proxmenux_logo
|
||||
msg_title "$(translate "Installing group"): $group_name"
|
||||
|
||||
if ! ensure_repositories; then
|
||||
msg_error "$(translate "Failed to configure repositories. Installation aborted.")"
|
||||
return 1
|
||||
fi
|
||||
|
||||
msg_ok "$(translate "Update package list successful")"
|
||||
|
||||
local failed=0
|
||||
local success=0
|
||||
@ -241,6 +266,13 @@ install_system_utils() {
|
||||
clear
|
||||
show_proxmenux_logo
|
||||
msg_title "$(translate "Installing selected utilities")"
|
||||
|
||||
if ! ensure_repositories; then
|
||||
msg_error "$(translate "Failed to configure repositories. Installation aborted.")"
|
||||
return 1
|
||||
fi
|
||||
|
||||
msg_ok "$(translate "Update package list successful")"
|
||||
|
||||
local failed=0
|
||||
local success=0
|
||||
@ -300,6 +332,7 @@ install_system_utils() {
|
||||
clear
|
||||
show_proxmenux_logo
|
||||
msg_info "$(translate "Verifying all utilities status")..."
|
||||
|
||||
|
||||
local utilities=(
|
||||
"axel:Download accelerator"
|
||||
|
Loading…
x
Reference in New Issue
Block a user