Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cleanup and parse feed

  • Loading branch information...
commit 156699bb4fc89d9678115bd0320fc683bf963769 1 parent 6bb29db
@mariuz authored
View
18 .project
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>kernelcompile</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.python.pydev.PyDevBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.aptana.projects.webnature</nature>
+ <nature>org.python.pydev.pythonNature</nature>
+ </natures>
+</projectDescription>
View
5 .pydevproject
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?eclipse-pydev version="1.0"?><pydev_project>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
+</pydev_project>
View
0  functions/__init__.py
No changes.
View
BIN  functions/__init__.pyc
Binary file not shown
View
23 functions/functions.py
@@ -0,0 +1,23 @@
+from feedparser import *
+from subprocess import *
+def GetStableVersion():
+ feed = parse('https://www.kernel.org/feeds/kdist.xml')
+ for item in feed.entries:
+ if (item.title.count('stable')==1):
+ kernel_version=item.title.split(':')[0]
+ return kernel_version
+
+def GetReleaseCandidateVersion():
+ feed = parse('https://www.kernel.org/feeds/kdist.xml')
+ for item in feed.entries:
+ if (item.title.count('mainline')==1):
+ kernel_version=item.title.split(':')[0]
+ return kernel_version
+
+def getCpuCount():
+ exec("grep -c processor /proc/cpuinfo",out)
+ return out[0]
+
+def Install(kernel_version):
+ Popen("dpkg -i /usr/src/linux-image-kernel_version-vanillaice_kernel_version-vanillaice-10.00.Custom_amd64.deb", shell=True)
+ Popen("dpkg -i /usr/src/linux-headers-kernel_version-vanillaice_kernel_version-vanillaice-10.00.Custom_amd64.deb",shell=True)
View
BIN  functions/functions.pyc
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.