Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

cleanup and parse feed

  • Loading branch information...
commit 156699bb4fc89d9678115bd0320fc683bf963769 1 parent 6bb29db
Popa Marius Adrian authored
18 .project
... ... @@ -0,0 +1,18 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<projectDescription>
  3 + <name>kernelcompile</name>
  4 + <comment></comment>
  5 + <projects>
  6 + </projects>
  7 + <buildSpec>
  8 + <buildCommand>
  9 + <name>org.python.pydev.PyDevBuilder</name>
  10 + <arguments>
  11 + </arguments>
  12 + </buildCommand>
  13 + </buildSpec>
  14 + <natures>
  15 + <nature>com.aptana.projects.webnature</nature>
  16 + <nature>org.python.pydev.pythonNature</nature>
  17 + </natures>
  18 +</projectDescription>
5 .pydevproject
... ... @@ -0,0 +1,5 @@
  1 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2 +<?eclipse-pydev version="1.0"?><pydev_project>
  3 +<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
  4 +<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
  5 +</pydev_project>
0  functions/__init__.py
No changes.
BIN  functions/__init__.pyc
Binary file not shown
23 functions/functions.py
... ... @@ -0,0 +1,23 @@
  1 +from feedparser import *
  2 +from subprocess import *
  3 +def GetStableVersion():
  4 + feed = parse('https://www.kernel.org/feeds/kdist.xml')
  5 + for item in feed.entries:
  6 + if (item.title.count('stable')==1):
  7 + kernel_version=item.title.split(':')[0]
  8 + return kernel_version
  9 +
  10 +def GetReleaseCandidateVersion():
  11 + feed = parse('https://www.kernel.org/feeds/kdist.xml')
  12 + for item in feed.entries:
  13 + if (item.title.count('mainline')==1):
  14 + kernel_version=item.title.split(':')[0]
  15 + return kernel_version
  16 +
  17 +def getCpuCount():
  18 + exec("grep -c processor /proc/cpuinfo",out)
  19 + return out[0]
  20 +
  21 +def Install(kernel_version):
  22 + Popen("dpkg -i /usr/src/linux-image-kernel_version-vanillaice_kernel_version-vanillaice-10.00.Custom_amd64.deb", shell=True)
  23 + Popen("dpkg -i /usr/src/linux-headers-kernel_version-vanillaice_kernel_version-vanillaice-10.00.Custom_amd64.deb",shell=True)
BIN  functions/functions.pyc
Binary file not shown

0 comments on commit 156699b

Please sign in to comment.
Something went wrong with that request. Please try again.