Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 24 lines (20 sloc) 0.583 kb
abac6f53 » hpa
2002-06-11 Add an API for COMBOOT images, and add support for "COM32" -- 32-bit
1 #!/usr/bin/perl
2 #
3 # Read the "version" file and produce some macro declarations
4 #
5
6 use Fcntl;
7
ec013c79 » hpa
2005-01-05 Clean up extlinux compilation issues
8 ($vfile, $vout, $def) = @ARGV;
abac6f53 » hpa
2002-06-11 Add an API for COMBOOT images, and add support for "COM32" -- 32-bit
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
80717f76 » hpa
2005-01-05 Allow the user to override the extlinux detected geometry; add online…
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";
abac6f53 » hpa
2002-06-11 Add an API for COMBOOT images, and add support for "COM32" -- 32-bit
24 close(VI);
25
26
Something went wrong with that request. Please try again.