Skip to content
Browse files

cleanup

  • Loading branch information...
1 parent a3fbe7d commit ee4270c26fd5a796efc8f6e6318a56cd00e36498 @mariuz committed Jul 24, 2012
Showing with 3 additions and 49 deletions.
  1. +0 −43 getKernelVersion.php
  2. +1 −2 kernel-compile.php
  3. +1 −2 optimized-kernel-compile.php
  4. +1 −2 rc-kernel-compile.php
View
43 getKernelVersion.php
@@ -1,43 +0,0 @@
-<?php
-include_once('./simplehtmldom/simple_html_dom.php');
-
-function GetStableVersion()
-{
-// create HTML DOM
- $html = file_get_html('http://www.kernel.org/kdist/version.shtml');
- foreach($html->find('tr') as $row) {
- foreach($row->find('td') as $td)
- {
- if ($td->innertext=='stable:')
- {
- $kernel_version=$row->find('strong', 0)->innertext;
- $ret = $kernel_version;
- // clean up memory
- $html->clear();
- unset($html);
- return $ret;
- }
- }
- }
-
-}
-function GetReleaseCandidateVersion()
-{
- $html = file_get_html('http://www.kernel.org/kdist/version.shtml');
- foreach($html->find('tr') as $row) {
- foreach($row->find('td') as $td)
- {
- if ($td->innertext=='mainline:')
- {
- $kernel_version=$row->find('strong', 0)->innertext;
- $ret = $kernel_version;
- // clean up memory
- $html->clear();
- unset($html);
- return $ret;
- }
- }
- }
-
-}
-?>
View
3 kernel-compile.php
@@ -2,8 +2,7 @@
<?
$KERNEL_URL='http://www.kernel.org/';
$BUILD_DIR="/usr/src";
-include_once('./getKernelVersion.php');
-include_once('./getCpuCount.php');
+include_once('./functions.php');
$kernel_version=GetStableVersion($KERNEL_URL);
$cpuCount=getCpuCount();
View
3 optimized-kernel-compile.php
@@ -2,8 +2,7 @@
<?
$KERNEL_URL='http://www.kernel.org/';
$BUILD_DIR="/usr/src";
-include_once('./getKernelVersion.php');
-include_once('./getCpuCount.php');
+include_once('./functions.php');
$kernel_version=GetStableVersion($KERNEL_URL);
$cpuCount=getCpuCount();
View
3 rc-kernel-compile.php
@@ -2,8 +2,7 @@
<?
$KERNEL_URL='http://www.kernel.org/';
$BUILD_DIR="/usr/src";
-include_once('./getKernelVersion.php');
-include_once('./getCpuCount.php');
+include_once('./functions.php');
$ReleaseCandidateVersion=GetReleaseCandidateVersion($KERNEL_URL);
$cpuCount=getCpuCount();

0 comments on commit ee4270c

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