[ create a new paste ] login | about

Link: http://codepad.org/qxnVa1FE    [ raw code | fork ]

Plain Text, pasted on Nov 6:
--- /usr/bin/archey	2010-11-05 19:15:30.000000000 +0100
+++ archey	2010-11-05 19:52:30.245683201 +0100
@@ -115,13 +115,13 @@ processes = map(xmonadfix, [process.spli
 p1 = None
 
 # Find Distro.
-DetectDistro = Popen(['lsb_release', '-i'], stdout=PIPE).communicate()[0].split(':')[1].lstrip('\t').rstrip('\n')
+DetectDistro = Popen(['lsb_release', '-d'], stdout=PIPE).communicate()[0].split(':')[1].lstrip('\t').rstrip('\n')
 
 # Print coloured key with normal value.
 def output(key, value):
  if DetectDistro == 'Ubuntu':
   output ='%s%s:%s %s' % (redB, key, clear, value)
- if DetectDistro == 'Arch':
+ if DetectDistro == 'Arch Linux':
   output = '%s%s:%s %s' % (blueB, key, clear, value)
  if DetectDistro == 'Debian':
   output = '%s%s:%s %s' % (redB, key, clear, value)
@@ -171,7 +171,7 @@ def distro_display():
  if DetectDistro == 'Ubuntu':
   release = Popen(['lsb_release', '-r'], stdout=PIPE).communicate()[0].split(':')[1].lstrip('\t').rstrip('\n')
   distro = 'Ubuntu %s %s' % (release, arch)
- if DetectDistro == 'Arch':
+ if DetectDistro == 'Arch Linux':
   distro = 'Arch Linux %s' % arch 
  if DetectDistro == 'Fedora':
   release = Popen(['lsb_release', '-r'], stdout=PIPE).communicate()[0].split(':')[1].lstrip('\t').rstrip('\n')
@@ -251,7 +251,7 @@ def packages_display():
   p3 = Popen(['wc', '-l'], stdin=p2.stdout, stdout=PIPE)
   packages = p3.communicate()[0].rstrip('\n')
   output ('Packages', packages)
- if DetectDistro == 'Arch':
+ if DetectDistro == 'Arch Linux':
   p1 = Popen(['pacman', '-Q'], stdout=PIPE)
   p2 = Popen(['wc', '-l'], stdin=p1.stdout, stdout=PIPE)
   packages = p2.communicate()[0].rstrip('\n')
@@ -329,7 +329,7 @@ if DetectDistro == 'Ubuntu':
 %s                                    %s
 %s""" % ( redN, result[0], redB, redN, result[1], redB, redN, result[2], yellowB, redB, redN, result[3], yellowB, redB, result[4], yellowB, redB, result[5], redB, yellowB, redB, result[6], redB, yellowB, redB, result[7], redB, yellowB, result[8], redB, yellowB, redN, result[9], redB, yellowB, redN, result[10], yellowB, redN, result[11], yellowB, redN, result[12], yellowB, redN, yellowB, result[13], redN, yellowB, result[14], redN, yellowB, result[15], yellowB, result[16], yellowB, result[17], clear )
 
-if DetectDistro == 'Arch':
+if DetectDistro == 'Arch Linux':
  print """%s
 %s               +                %s
 %s               #                %s



Create a new paste based on this one


Comments: