forked from CastroFidel/winehelper
		
	dropped function: check_command
This commit is contained in:
		
							
								
								
									
										16
									
								
								winehelper
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								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 | ||||
|  | ||||
|     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" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user