mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 02:24:16 +02:00
cleaning .desktop file from .local
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# used for AUR installation
|
||||
# Generates a .desktop file based on the current python version. Used for AUR installation
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
@@ -13,12 +13,12 @@ Exec = /usr/bin/fpakman
|
||||
Icon = /usr/lib/python{version}/site-packages/fpakman/resources/img/flathub_45.svg
|
||||
""".format(version="{}.{}".format(sys.version_info.major, sys.version_info.minor))
|
||||
|
||||
apps_path = '{}/.local/share/applications'.format(str(Path.home()))
|
||||
|
||||
if not os.path.exists(apps_path):
|
||||
os.mkdir(apps_path)
|
||||
|
||||
file_path = 'fpakman.desktop'.format(apps_path)
|
||||
|
||||
with open(file_path, 'w+') as f:
|
||||
with open('fpakman.desktop', 'w+') as f:
|
||||
f.write(desktop_file)
|
||||
|
||||
|
||||
# cleaning the old fpakman.desktop entry model -> the following lines will be removed for the next releases
|
||||
desktop_file_path = '{}/.local/share/applications/fpakman.desktop'.format(str(Path.home()))
|
||||
|
||||
if os.path.exists(desktop_file_path):
|
||||
os.remove(desktop_file_path)
|
||||
|
||||
Reference in New Issue
Block a user