2022-05-03 17:02:39 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
import sys
|
2022-05-07 14:02:07 +00:00
|
|
|
from datetime import datetime
|
2022-05-03 17:02:39 +00:00
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
script_dir = Path(__file__).parent.absolute()
|
|
|
|
|
|
|
|
sys.path.insert(0, str(script_dir))
|
|
|
|
|
2022-05-07 15:01:05 +00:00
|
|
|
from shared import box, install_latest_pipx, local_bin, poetry_update, run, spaced_hl
|
2022-05-03 17:02:39 +00:00
|
|
|
|
|
|
|
spaced_hl()
|
|
|
|
|
|
|
|
dt = datetime.now().strftime("%d.%m.%Y %H:%M:%S")
|
|
|
|
|
|
|
|
box(dt, "Update on")
|
|
|
|
|
|
|
|
box("Upgrade pipx")
|
|
|
|
install_latest_pipx()
|
|
|
|
|
|
|
|
box("Upgrade pipx packages")
|
|
|
|
pipx_bin = local_bin / "pipx"
|
|
|
|
run(f"{pipx_bin} upgrade-all --include-injected")
|
|
|
|
|
|
|
|
# TODO: Backup
|
|
|
|
|
|
|
|
box("Install latest Poetry packages")
|
2022-05-07 15:01:05 +00:00
|
|
|
poetry_update(script_dir)
|