Skip to content

Commit 49acf81

Browse files
committed
Adding Support for Void Linux
1 parent 03a0f2b commit 49acf81

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

python_update.py

+20-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Python 3 Linux System Update Script \\
55
// Cody Kankel \\
66
|| Started Jul 11, 2016 ||
7-
|| Last update: Jan 20th, 2018 ||
7+
|| Last update: Feb 28th, 2020 ||
88
\\ Currently supports Arch, Red-Hat, Fedora, and Solus and those based on them. //
99
\\ Testing with Slackware and those based on it. //
1010
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\///////////////////////////////////////////////"""
@@ -150,6 +150,24 @@ def update(user_name):
150150
subprocess.check_call(['slackpkg', 'install-new'])
151151
subprocess.check_call(['slackpkg', 'upgrade-all'])
152152
#subprocess.check_call(['slackpkg', 'clean-system'])
153+
elif system == 'void':
154+
if user_name == "root":
155+
update_xbps = subprocess.Popen((['xbps-install','-u','xbps']))
156+
update_xbps.wait()
157+
update = subprocess.Popen((['xbps-install','-Su']))
158+
update.wait()
159+
else:
160+
try:
161+
update_xbps = subprocess.Popen((['sudo','xbps-install','-u','xbps']))
162+
update_xbps.wait()
163+
update = subprocess.Popen((['sudo','xbps-install','-Su']))
164+
update.wait()
165+
except subprocess.CalledProcessError:
166+
print("Incorrect Password.")
167+
repeatVar = True
168+
169+
save_update(user_name)
170+
153171
else:
154172
print("\nSystem is not recognized currently. If you feel as if this is an error,\n"\
155173
+ "please report it as an issue on Github.\n")
@@ -170,7 +188,7 @@ def get_system_type():
170188
distro_choices = {'fedora': 'fedora', 'centos': 'rhel', 'scientific': 'rhel', 'rhel': 'rhel', \
171189
'debian': 'debian', 'ubuntu': 'debian', 'xubuntu': 'debian', 'galliumos': 'debian', \
172190
'elementary': 'debian', 'arch': 'arch', 'antergos': 'arch', 'manjaro': 'arch', \
173-
'solus': 'solus', 'slackware': 'slackware'}
191+
'solus': 'solus', 'slackware': 'slackware', 'void':'void'}
174192
default = 'Unknown'
175193
system = distro_choices.get(system_id, default)
176194
if system == default:

0 commit comments

Comments
 (0)