diff options
author | SamLukeYes | 2020-06-25 16:01:25 +0800 |
---|---|---|
committer | SamLukeYes | 2020-06-25 16:01:25 +0800 |
commit | 2c81bb2d7b05824ef6981fe9de7ef71a275fce81 (patch) | |
tree | 7a6ab7d5a43ad72e0f5f8204b615ec6363458923 /xdroid-installer.py | |
parent | 91bf6baa1e4b0fd7cbabc0b2a17e2be93411fb01 (diff) | |
download | aur-xdroid-installer.tar.gz |
update 4.0082
Diffstat (limited to 'xdroid-installer.py')
-rw-r--r-- | xdroid-installer.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/xdroid-installer.py b/xdroid-installer.py index 5fa9f0e29369..c9ac977771c3 100644 --- a/xdroid-installer.py +++ b/xdroid-installer.py @@ -5,10 +5,12 @@ import os, sys try: import easygui as eg dialogs = True -except: +except ModuleNotFoundError: dialogs = False uninstaller = '/opt/xdroid/remove-xdroid-launcher' +reinstall = 'Upgrade/Reinstall' +uninstall = 'Uninstall' def install(): sys.exit(os.system('tar -xzvf /opt/xdroid-installer/xdroid.tar.gz -C /tmp \ @@ -25,14 +27,15 @@ if os.getuid() == 0: if os.path.isfile(uninstaller): if dialogs: - option = eg.choicebox("Do you want to reinstall or uninstall xDroid?", "xDroid Installer", - choices=["Reinstall", "Uninstall"]) + option = eg.choicebox("You have xDroid installed already. What do you want to do next?", + title="xDroid Installer", + choices=[reinstall, uninstall]) else: - option = "Uninstall" + option = uninstall - if option == "Reinstall": + if option == reinstall: install() - elif option == "Uninstall": + elif option == uninstall: os.system(uninstaller) else: |