mirror of
https://github.com/Derisis13/barusu.git
synced 2025-12-06 19:42:48 +01:00
Changed setup.py to install dependencies and provide more information of the program
Also cleaned up main.py
This commit is contained in:
12
main.py
12
main.py
@@ -76,15 +76,15 @@ def restore():
|
||||
|
||||
|
||||
def check_progs():
|
||||
apt = distutils.spawn.find_executable("apt-get")
|
||||
dconf = distutils.spawn.find_executable("dconf")
|
||||
if apt == False:
|
||||
apt_present = distutils.spawn.find_executable("apt-get")
|
||||
dconf_present = distutils.spawn.find_executable("dconf")
|
||||
if apt_present is False:
|
||||
print("Your system is not using apt as a package manager! Barusu uses apt to back up your packages. Barusu IS "
|
||||
"NOT designed to work with other packaging tools.")
|
||||
if dconf = False:
|
||||
if dconf_present is False:
|
||||
print("Your system is not using dconf! Barusu uses dconf to back up your settings. Barusu IS "
|
||||
"NOT designed to work with other settings manager.")
|
||||
return apt, dconf
|
||||
return apt_present, dconf_present
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
@@ -94,6 +94,7 @@ if __name__ == '__main__':
|
||||
except getopt.GetoptError as err:
|
||||
print("Error: ", err.msg)
|
||||
exit(1)
|
||||
else:
|
||||
for option, value in options:
|
||||
if option in ("-h", "help"):
|
||||
print("usage: backup_assistant [opts]\n\
|
||||
@@ -122,4 +123,3 @@ if __name__ == '__main__':
|
||||
run_daily()
|
||||
list_pkgs()
|
||||
save_settings()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user