dropped function: check_command

This commit is contained in:
Mikhail Tergoev 2025-05-28 22:29:03 +03:00
parent 8cc9cb17bb
commit bd482ea757

View File

@ -126,15 +126,6 @@ else
fi
##### HELPER FUNCTIONS #####
check_command () {
if command -v "$1" &>/dev/null ; then
return 0
else
print_warning "command: $1 - not found!"
return 1
fi
}
add_to_var () {
if ! echo ${!1} | grep "$2" &>/dev/null
then export $1="${!1} $2"
@ -449,9 +440,7 @@ EOF
fi
# Обновляем кэш desktop файлов
if check_command update-desktop-database ; then
update-desktop-database "$HOME/.local/share/applications"
fi
if [[ $4 != "nocopy" ]] ; then
if [[ -n $4 ]] ; then
@ -498,9 +487,8 @@ remove_desktop () {
fi
# Обновляем кэш desktop файлов
if check_command update-desktop-database ; then
update-desktop-database "$HOME/.local/share/applications"
fi
}
##### INSTALLED PROGRAMS #####
@ -1346,9 +1334,7 @@ remove_winehelper () {
done
# Обновление кэша desktop-файлов
if check_command update-desktop-database; then
update-desktop-database "$HOME/.local/share/applications"
fi
# Удаление символических ссылок
try_remove_file "$HOME/.winehelper"