Magellan Linux

Contents of /trunk/mkinitrd-magellan/isolinux/version.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (show annotations) (download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File MIME type: text/plain
File size: 583 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd

1 #!/usr/bin/perl
2 #
3 # Read the "version" file and produce some macro declarations
4 #
5
6 use Fcntl;
7
8 ($vfile, $vout, $def) = @ARGV;
9 sysopen(VERSION, $vfile, O_RDONLY) or die "$0: Cannot open $vfile\n";
10 $version = <VERSION>;
11 chomp $version;
12 close(VERSION);
13
14 unless ( $version =~ /^([0-9]+)\.([0-9]+)$/ ) {
15 die "$0: Cannot parse version format\n";
16 }
17 $vma = $1+0; $vmi = $2+0;
18
19 sysopen(VI, $vout, O_WRONLY|O_CREAT|O_TRUNC)
20 or die "$0: Cannot create $vout: $!\n";
21 print VI "$def VERSION \"$version\"\n";
22 print VI "$def VER_MAJOR $vma\n";
23 print VI "$def VER_MINOR $vmi\n";
24 close(VI);
25
26

Properties

Name Value
svn:executable *