mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-19 11:09:03 +00:00
cleaned up the code
This commit is contained in:
parent
829335a739
commit
638db2dbf6
@ -56,8 +56,8 @@ try:
|
||||
f' * {os.path.join(filepath, "app.asar.bak")} was not found: step skipped.')
|
||||
|
||||
if sys.platform == 'linux' and 'microsoft' not in platform.uname()[3].lower():
|
||||
pathlist = ['/usr/bin/notion-app', '/usr/bin/notion', '/opt/notion-app/notion-app']
|
||||
# get all the possible paths where the launcher may be located
|
||||
pathlist = ('/usr/bin/notion-app', '/usr/bin/notion', '/opt/notion-app/notion-app')
|
||||
# check all the possible paths where the launcher may be located
|
||||
for path in pathlist:
|
||||
if os.path.exists(path):
|
||||
with open(path, 'r', encoding='UTF-8') as launcher:
|
||||
|
@ -224,15 +224,12 @@ try:
|
||||
f' * {os.path.join(filepath, "app", "main", "main.js")} was not found: step skipped.')
|
||||
|
||||
if sys.platform == 'linux' and 'microsoft' not in platform.uname()[3].lower():
|
||||
def patch(dest):
|
||||
print(f' ...patching app launcher in {path}')
|
||||
subprocess.call(['sed', '-i', r's/electron6\ app\.asar/electron6\ app/', dest])
|
||||
|
||||
pathlist = ['/usr/bin/notion-app', '/usr/bin/notion', '/opt/notion-app/notion-app']
|
||||
pathlist = ('/usr/bin/notion-app', '/usr/bin/notion', '/opt/notion-app/notion-app')
|
||||
# check all the paths where the launcher may be located
|
||||
for path in pathlist:
|
||||
if os.path.exists(path):
|
||||
patch(path)
|
||||
print(f' ...patching app launcher in {path}')
|
||||
subprocess.call(['sed', '-i', r's/electron6\ app\.asar/electron6\ app/', path])
|
||||
|
||||
print('\n>>> SUCCESSFULLY CUSTOMISED <<<')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user