4
4
// Python 3 Linux System Update Script \\
5
5
// Cody Kankel \\
6
6
|| Started Jul 11, 2016 ||
7
- || Last update: Jan 20th, 2018 ||
7
+ || Last update: Feb 28th, 2020 ||
8
8
\\ Currently supports Arch, Red-Hat, Fedora, and Solus and those based on them. //
9
9
\\ Testing with Slackware and those based on it. //
10
10
\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \///////////////////////////////////////////////"""
@@ -150,6 +150,24 @@ def update(user_name):
150
150
subprocess .check_call (['slackpkg' , 'install-new' ])
151
151
subprocess .check_call (['slackpkg' , 'upgrade-all' ])
152
152
#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
+
153
171
else :
154
172
print ("\n System is not recognized currently. If you feel as if this is an error,\n " \
155
173
+ "please report it as an issue on Github.\n " )
@@ -170,7 +188,7 @@ def get_system_type():
170
188
distro_choices = {'fedora' : 'fedora' , 'centos' : 'rhel' , 'scientific' : 'rhel' , 'rhel' : 'rhel' , \
171
189
'debian' : 'debian' , 'ubuntu' : 'debian' , 'xubuntu' : 'debian' , 'galliumos' : 'debian' , \
172
190
'elementary' : 'debian' , 'arch' : 'arch' , 'antergos' : 'arch' , 'manjaro' : 'arch' , \
173
- 'solus' : 'solus' , 'slackware' : 'slackware' }
191
+ 'solus' : 'solus' , 'slackware' : 'slackware' , 'void' : 'void' }
174
192
default = 'Unknown'
175
193
system = distro_choices .get (system_id , default )
176
194
if system == default :
0 commit comments