Skip to content

Commit 7975646

Browse files
refactor yeti
1 parent 2d4b067 commit 7975646

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

initialize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
subprocess.run('pip3 install --upgrade pip', shell=True, check=False)
3939
subprocess.run('python3 ~/yeticold/utils/downloadbitcoin.py', shell=True, check=False)
4040

41-
subprocess.run('python3 ~/yeticold/utils/CreateShortcuts.py', shell=True, check=False)
41+
subprocess.run('sudo python3 ~/yeticold/utils/CreateShortcuts.py '+HOME, shell=True, check=False)
4242
# Check if required python packages have been installed
4343
# Hide python errors by sending stderr to /dev/null see:https://stackoverflow.com/a/818265/3425022
4444
# 'subprocess.run' is current recommended way to interact with system

utils/CreateShortcuts.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import subprocess
22
import os
3+
import sys
34

4-
home = os.getenv("HOME")
5+
home = sys.argv[1]
56

67
file = '[Desktop Entry]\nVersion=1.0\nName=YetiLevelOnePrimary\nExec=python3 '+home+'/yeticold/initialize.py YetiLevelOnePrimary %F\nTerminal=false\nX-MultipleArgs=false\nType=Application\nIcon='+home+'/yeticold/static/logo.png\nStartupNotify=true'
7-
subprocess.call('echo "'+file+'" >> /usr/share/applications/YetiLevelOnePrimary.desktop', shell=True)
8-
subprocess.call('chmod +x /usr/share/applications/YetiLevelOnePrimary.desktop', shell=True)
9-
subprocess.run('ln -s '+home+'/yeticold/shortcuts/YetiLevelOnePrimary.desktop '+home+'/Desktop/YetiLevelOnePrimary.desktop', shell=True, check=False)
8+
subprocess.call('sudo echo "'+file+'" >> /usr/share/applications/YetiLevelOnePrimary.desktop', shell=True)
9+
subprocess.call('sudo chmod +x /usr/share/applications/YetiLevelOnePrimary.desktop', shell=True)
10+
subprocess.run('sudo ln -s '+home+'/yeticold/shortcuts/YetiLevelOnePrimary.desktop '+home+'/Desktop/YetiLevelOnePrimary.desktop', shell=True, check=False)
1011

0 commit comments

Comments
 (0)