added check file desktop.list before grep
This commit is contained in:
parent
717e6c0e7d
commit
b4d36b15e8
@ -405,7 +405,8 @@ create_desktop () {
|
||||
|
||||
|
||||
# добавляем информацию о приложении в "$WINEPREFIX/desktop.list"
|
||||
if grep -qe "^${name_desktop}=" "$WINEPREFIX/desktop.list"
|
||||
if [[ -f "$WINEPREFIX/desktop.list" ]] \
|
||||
&& grep -qe "^${name_desktop}=" "$WINEPREFIX/desktop.list"
|
||||
then sed -i "/^$name_desktop=/d" "$WINEPREFIX/desktop.list"
|
||||
fi
|
||||
echo "$name_desktop=${exe_file//$WINEPREFIX/}" >> "$WINEPREFIX/desktop.list"
|
||||
|
Loading…
x
Reference in New Issue
Block a user