[goffice] distcheck fixes
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] distcheck fixes
- Date: Sat, 3 Mar 2012 00:03:38 +0000 (UTC)
commit f0ca4b99d6c6226afed0268c067694aaecc508a1
Author: Morten Welinder <terra gnome org>
Date: Fri Mar 2 19:03:23 2012 -0500
distcheck fixes
tools/resource-embedder | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/tools/resource-embedder b/tools/resource-embedder
index 7c4e2db..870feb5 100755
--- a/tools/resource-embedder
+++ b/tools/resource-embedder
@@ -34,12 +34,12 @@ my $filedir = ".";
my $srcfile = shift @ARGV;
my $dstfile = shift @ARGV;
-my $data = &read_file ($srcfile);
+my $data = &read_file ($srcfile, undef);
while ($data =~ m{(<service\s+type="resource"\s+id=".*")(\s+)file="(.*)"(\s*/>)}) {
my $filename = $3;
print STDERR "Embedding $filename\n";
- my $file_data = &read_file ($filename);
+ my $file_data = &read_file ($filename, $filedir);
my $encoded_data = &xml_encode ($file_data);
$data = $PREMATCH . $1 . $2 . "data=\"$encoded_data\"" . $4 . $POSTMATCH;
}
@@ -49,10 +49,10 @@ while ($data =~ m{(<service\s+type="resource"\s+id=".*")(\s+)file="(.*)"(\s*/>)}
sub read_file
{
- my ($filename) = @_;
+ my ($filename,$dir) = @_;
- if ($filename !~ m|^/|) {
- $filename = "$filedir/$filename";
+ if ($filename !~ m|^/| && defined $dir) {
+ $filename = "$dir/$filename";
}
local (*FIL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]