summaryrefslogtreecommitdiff
path: root/src/backend/update.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/update.py')
-rw-r--r--src/backend/update.py41
1 files changed, 16 insertions, 25 deletions
diff --git a/src/backend/update.py b/src/backend/update.py
index dc16d4c..54e07e3 100644
--- a/src/backend/update.py
+++ b/src/backend/update.py
@@ -19,7 +19,7 @@ def sync_evrth():
@animation.wait('fetching updates')
-def start():
+def start(gfx_ui=False):
actv_brch = sisyphus.getenv.sys_brch()
bhst_addr = sisyphus.getenv.bhst_addr()
is_sane = sisyphus.checkenv.sanity()
@@ -33,31 +33,22 @@ def start():
else:
print(sisyphus.getcolor.green + "\n\nActive branch:" + " " + sisyphus.getcolor.reset + "'" + actv_brch + "'" + " " + "(testing)" +
" " + sisyphus.getcolor.green + "\nActive binhost:" + " " + sisyphus.getcolor.reset + "'" + bhst_addr + "'" + " " + "(stable)")
- sys.exit(sisyphus.getcolor.bright_red + "\n\nInvalid configuration!" + sisyphus.getcolor.reset + sisyphus.getcolor.bright_yellow + "\nUse" +
- sisyphus.getcolor.reset + " " + "'" + "sisyphus branch --help" + "'" + " " + sisyphus.getcolor.bright_yellow + "for help" + sisyphus.getcolor.reset)
+ if gfx_ui:
+ print("\n\nInvalid configuration!")
+ print("Use 'sisyphus branch --help' for help\n")
+ t = 10
+ while t > 0:
+ mins, secs = divmod(t, 60)
+ timer = '{:02d}:{:02d}'.format(mins, secs)
+ print(timer, end='\r')
+ time.sleep(1)
+ t -= 1
-def xstart():
- actv_brch = sisyphus.getenv.sys_brch()
- bhst_addr = sisyphus.getenv.bhst_addr()
- is_sane = sisyphus.checkenv.sanity()
+ print('Time is up!')
+ sys.exit()
- if is_sane == 1:
- sync_evrth()
- else:
- if "packages-next" in bhst_addr:
- print("\n\nActive branch:" + " " + "'" + actv_brch + "'" + " " + "(stable)" +
- "\nActive binhost:" + " " + "'" + bhst_addr + "'" + " " + "(testing)")
else:
- print("\n\nActive branch:" + " " + "'" + actv_brch + "'" + " " + "(testing)" +
- "\nActive binhost:" + " " + "'" + bhst_addr + "'" + " " + "(stable)")
- print("\n\nInvalid configuration!" +
- "\nUse 'sisyphus branch --help' for help\n")
- t = int(10)
- while t:
- mins, secs = divmod(t, 60)
- timer = '{:02d}:{:02d}'.format(mins, secs)
- print(timer, end="\r")
- time.sleep(1)
- t -= 1
- sys.exit()
+ print(sisyphus.getcolor.bright_red + "\n\nInvalid configuration!" + sisyphus.getcolor.reset + sisyphus.getcolor.bright_yellow + "\nUse" +
+ sisyphus.getcolor.reset + " " + "'" + "sisyphus branch --help" + "'" + " " + sisyphus.getcolor.bright_yellow + "for help" + sisyphus.getcolor.reset)
+ sys.exit()