mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-26 21:24:34 +00:00
23 lines
622 B
Python
23 lines
622 B
Python
import os
|
|
|
|
from src.packages import install_packages
|
|
from src.dotfiles import install_dotfiles
|
|
from src.util.user import Input, Print
|
|
|
|
|
|
def main():
|
|
if os.geteuid() == 0:
|
|
Print.err("You can't to run this program as root user")
|
|
return
|
|
|
|
if Input.yes_no("Do you wish to perform package install (from `packages.yaml`)?"):
|
|
install_packages()
|
|
if Input.yes_no("Do you wish to install dotfiles (sync `home/` and `root/` directories accordingly)? You can make a backup."):
|
|
install_dotfiles()
|
|
|
|
|
|
try:
|
|
main()
|
|
except KeyboardInterrupt:
|
|
Print.err("User cancelled (KeyboardInterrupt)")
|