print_error if exe file not found for desktop
This commit is contained in:
10
winehelper
10
winehelper
@@ -553,8 +553,6 @@ create_desktop () {
|
||||
if [[ -z "$name_desktop" ]] || [[ -z "$exe_file" ]] ; then
|
||||
fatal "Использование: $0 desktop \"Имя ярлыка\" \"/путь/к/файлу.exe\" [иконка|auto] [имя_desktop_файла]"
|
||||
elif [[ ! -f "$exe_file" ]] ; then
|
||||
print_warning "Для создания ярлыка не найден исполняемый файл: $exe_file"
|
||||
|
||||
local BASENAME_EXE="$(basename "$exe_file")"
|
||||
print_info "Запускаем поиск $BASENAME_EXE"
|
||||
local FIND_PATH
|
||||
@@ -565,9 +563,11 @@ create_desktop () {
|
||||
exe_file="$(find "$FIND_PATH" -type f -not -type l \
|
||||
-not -path "*/windows/*" -not -path "*/dosdevices/*" \
|
||||
-iname "$BASENAME_EXE")"
|
||||
if [[ -z "$exe_file" ]] || [[ ! -f "$exe_file" ]]
|
||||
then fatal "Для создания ярлыка не найден исполняемый файл: $BASENAME_EXE"
|
||||
else print_ok "Исполняемый файл $BASENAME_EXE найден по пути: $(dirname "$exe_file")/"
|
||||
if [[ -z "$exe_file" ]] || [[ ! -f "$exe_file" ]] ; then
|
||||
print_error "Для создания ярлыка не найден исполняемый файл: $BASENAME_EXE"
|
||||
return 1
|
||||
else
|
||||
print_ok "Исполняемый файл $BASENAME_EXE найден по пути: $(dirname "$exe_file")/"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user