added update command

This commit is contained in:
Nicholas Dyer 2023-05-14 19:41:44 -04:00
parent d4ff6d0786
commit 2def4f846a
2 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,7 @@
import os
import sys
import pygame
def reboot_system():
@ -7,3 +10,8 @@ def reboot_system():
def shutdown_system():
os.system('sudo shutdown now')
def update():
os.system('bash "cd ~/pocket_friends && git pull"')
os.system('bash "cd ~/pocket_friends && git checkout ."')
sys.exit(1)

View File

@ -5,7 +5,8 @@ import pocket_friends.development.dev as dev
dev_functions = {
'Restart': 'reboot_system',
'Shutdown': 'shutdown_system'
'Shutdown': 'shutdown_system',
'Update': 'update'
}