diff options
author | hpa <hpa> | 2005-01-05 01:01:29 +0000 |
---|---|---|
committer | hpa <hpa> | 2005-01-05 01:01:29 +0000 |
commit | 80717f76b561e490cf862c87be2e3ef1e5596b37 (patch) | |
tree | d5b7b3359e765ea6c2647962c5270034df29f65b /version.pl | |
parent | 76508a9bc942a693dc8ac773fc471501580d7bbf (diff) | |
download | syslinux-80717f76b561e490cf862c87be2e3ef1e5596b37.tar.gz |
Allow the user to override the extlinux detected geometry; add online help
Diffstat (limited to 'version.pl')
-rwxr-xr-x | version.pl | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -5,7 +5,7 @@ use Fcntl; -$vfile = $ARGV[0]; +($vfile, $vout, $def) = $ARGV[0]; sysopen(VERSION, $vfile, O_RDONLY) or die "$0: Cannot open $vfile\n"; $version = <VERSION>; chomp $version; @@ -16,10 +16,11 @@ unless ( $version =~ /^([0-9]+)\.([0-9]+)$/ ) { } $vma = $1+0; $vmi = $2+0; -open(VI, "> version.gen") or die "$0: Cannot create version.gen\n"; -print VI "%define VERSION \"$version\"\n"; -print VI "%define VER_MAJOR $vma\n"; -print VI "%define VER_MINOR $vmi\n"; +sysopen(VI, $vout, O_WRONLY|O_CREAT|O_TRUNC) + or die "$0: Cannot create $vout: $!\n"; +print VI "$def VERSION \"$version\"\n"; +print VI "$def VER_MAJOR $vma\n"; +print VI "$def VER_MINOR $vmi\n"; close(VI); |