r4103 - dists/trunk/scripts
Andres Salomon
dilinger at costa.debian.org
Thu Sep 1 04:48:54 UTC 2005
Author: dilinger
Date: 2005-09-01 04:48:53 +0000 (Thu, 01 Sep 2005)
New Revision: 4103
Modified:
dists/trunk/scripts/prune-non-free
Log:
Re-add the automatic version detection; I can't imagine why you'd not want
this.
waldi: please provide reasoning for such changes in your commit logs, otherwise
I have no idea why you'd do such a thing.
Modified: dists/trunk/scripts/prune-non-free
===================================================================
--- dists/trunk/scripts/prune-non-free 2005-09-01 04:40:58 UTC (rev 4102)
+++ dists/trunk/scripts/prune-non-free 2005-09-01 04:48:53 UTC (rev 4103)
@@ -134,6 +134,14 @@
tf.path
end
+def kversion(file)
+ tarball = File.basename(file)
+ unless tarball =~ /^linux-([0-9\.]+)\.tar.*$/
+ raise "cannot determine kernel version from '#{tarball}'!"
+ end
+ $1
+end
+
def zip_type(tarball)
if tarball =~ /\.gz$/
'z'
@@ -256,10 +264,10 @@
FileUtils.mv(name + '.new', name)
end
-raise "Usage: #{$0} <kernel tarball> <debian version>" unless ARGV.length == 2
+raise "Usage: #{$0} <kernel tarball>" unless ARGV.length == 1
# Create source directories
-version = ARGV[1]
+version = kversion(ARGV[0])
raise "Error: unable to determine tree from version string #{version}!" unless version =~ /^(\d+\.\d+)\./
tree = $1
free_dir = "linux-#{tree}-#{version}"
More information about the Kernel-svn-changes
mailing list