The gconf.pl script is no longer needed since we now have the GCONF_SCHEMAS
macro.
This commit is contained in:
parent
8b36218d8e
commit
7de4259c81
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=22910
1 changed files with 0 additions and 58 deletions
|
@ -1,58 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
#
|
||||
# gconf.pl - a script to add proper gconf schema handling to port PLISTs
|
||||
# usage: gconf.pl [plist] [plist] [...]
|
||||
#
|
||||
# $Id: gconf.pl,v 1.2 2004-07-17 15:48:45 marcus Exp $
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
if (scalar(@ARGV) == 0) {
|
||||
|
||||
# If no arguments were given, assume we're using the pkg-plist in the
|
||||
# current directory.
|
||||
push @ARGV, "./pkg-plist";
|
||||
}
|
||||
|
||||
foreach (@ARGV) {
|
||||
unless (open(INFILE, $_)) {
|
||||
warn "Unable to open $_: $!\n";
|
||||
next;
|
||||
}
|
||||
|
||||
my @file = <INFILE>;
|
||||
|
||||
close(INFILE);
|
||||
|
||||
for (my $i = 0 ; $i < scalar(@file) ; $i++) {
|
||||
my ($install, $uninstall);
|
||||
next unless $file[$i] =~ m|^etc/gconf/schemas/.*\.schemas?\n$|;
|
||||
my $schema = $file[$i];
|
||||
chomp $schema;
|
||||
$uninstall =
|
||||
"\@unexec env GCONF_CONFIG_SOURCE=xml::\%D/etc/gconf/gconf.xml.defaults gconftool-2 --makefile-uninstall-rule \%D/$schema > /dev/null || /usr/bin/true\n";
|
||||
|
||||
if ($file[$i - 1] ne $uninstall) {
|
||||
splice @file, $i, 0, $uninstall;
|
||||
$i++
|
||||
}
|
||||
|
||||
$install =
|
||||
"\@exec env GCONF_CONFIG_SOURCE=xml::\%D/etc/gconf/gconf.xml.defaults gconftool-2 --makefile-install-rule \%D/$schema > /dev/null || /usr/bin/true\n";
|
||||
if ($file[$i + 1] ne $install) {
|
||||
splice @file, $i + 1, 0, $install;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
unless (open(OUTFILE, ">" . $_)) {
|
||||
warn "Failed to open $_: $!\n";
|
||||
next;
|
||||
}
|
||||
|
||||
print OUTFILE @file;
|
||||
|
||||
close(OUTFILE);
|
||||
}
|
Loading…
Reference in a new issue