diff --git a/winehelper b/winehelper index 2fb629d..a95414e 100755 --- a/winehelper +++ b/winehelper @@ -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 + update-desktop-database "$HOME/.local/share/applications" 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 + update-desktop-database "$HOME/.local/share/applications" + } ##### 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 + update-desktop-database "$HOME/.local/share/applications" # Удаление символических ссылок try_remove_file "$HOME/.winehelper"