| Line | |
|---|
| 1 | #!perl |
|---|
| 2 | |
|---|
| 3 | $basedir = $0; |
|---|
| 4 | $basedir =~ s/\\[^\\]*$//; |
|---|
| 5 | $basedir =~ s/\\[^\\]*$//; |
|---|
| 6 | $basedir =~ s/\\[^\\]*$//; |
|---|
| 7 | $basedir =~ s/\\[^\\]*$//; |
|---|
| 8 | $basedir =~ s/\\[^\\]*$//; |
|---|
| 9 | -d $basedir or die "$basedir: $!"; |
|---|
| 10 | chdir $basedir or die "$basedir: $!"; |
|---|
| 11 | |
|---|
| 12 | require "$basedir\\infrastructure\\BoxPlatform.pm.in"; |
|---|
| 13 | |
|---|
| 14 | my $verfile = "$basedir/lib/common/BoxVersion.h"; |
|---|
| 15 | my $newver = "#define BOX_VERSION \"$BoxPlatform::product_version\"\n"; |
|---|
| 16 | my $oldver = ""; |
|---|
| 17 | |
|---|
| 18 | if (-r $verfile) |
|---|
| 19 | { |
|---|
| 20 | open VERSIONFILE, "< $verfile" or die "$verfile: $!"; |
|---|
| 21 | $oldver = <VERSIONFILE>; |
|---|
| 22 | close VERSIONFILE; |
|---|
| 23 | |
|---|
| 24 | } |
|---|
| 25 | |
|---|
| 26 | if ($newver ne $oldver) |
|---|
| 27 | { |
|---|
| 28 | open VERSIONFILE, "> $verfile" or die "BoxVersion.h: $!"; |
|---|
| 29 | print VERSIONFILE $newver; |
|---|
| 30 | close VERSIONFILE; |
|---|
| 31 | } |
|---|
| 32 | |
|---|
| 33 | print $BoxPlatform::product_version; |
|---|
| 34 | exit 0; |
|---|
Note: See
TracBrowser
for help on using the repository browser.