1
0
mirror of https://github.com/fspc/gbootroot.git synced 2025-02-22 16:43:23 -05:00

In case the name of the package is different than the main program name which

contains the $version, the program looks for $prog_real_name instead.
This commit is contained in:
freesource 2001-09-15 05:05:44 +00:00
parent f484445a93
commit fafd37f4a1

View File

@ -23,6 +23,7 @@ use File::Find;
my $user_home = "/home/mttrader"; my $user_home = "/home/mttrader";
my $prog = "gbootroot"; my $prog = "gbootroot";
my $prog_real_name = "gbootroot";
my $revision = 1; my $revision = 1;
my $dist = "unstable"; my $dist = "unstable";
my $urgency = "low"; my $urgency = "low";
@ -42,8 +43,8 @@ my ($real_uid, $real_gid) = (stat($user_home))[4,5];
# Find the version # Find the version
my $version; my $version;
open(CVS, "$gbootroot_cvs/$prog") or open(CVS, "$gbootroot_cvs/$prog_real_name") or
die "Couldn't find $prog in $gbootroot_cvs: $!\n"; die "Couldn't find $prog_real_name in $gbootroot_cvs: $!\n";
while (<CVS>) { while (<CVS>) {
if (/\my \$version/) { if (/\my \$version/) {
$version = (split(/=/,$_))[1]; $version = (split(/=/,$_))[1];