[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: xlib6/xlib6g



On Thu, 9 Oct 1997, Will Lowe wrote:

> On Wed, 8 Oct 1997, Marcus Brinkmann wrote:
> 
> > IIRC, you have first to upgrade xlib6 to a new version (3.3-6 e.g), and then
> > you can installing the new xlib6g (for libc6).
> > 
> > It will break a few of your x programs (e.g. fvwm2 and its modules), so you
> > will want to run a script on them more than once published on debian-user
> > and/or debian-devel.
> 
> searching through the mail archives,  I found this
> #!/bin/sed -f   
> s|/usr/X11R6/lib\([^/]\)|/usr/zzzzz/lib\1|     
> 
> and I put it in a script called "fixit" -- then if I run 
> fixit /usr/lib/netscape/netscape
> or
> fixit /usr/X11R6/bin/fvwm95-2
> 
> I get "sed -- bad argument to s".

This is a perl script, originally posted on debian-devel by Philippe
Troin. It does work for me.

Note: You should get one and only one replacement, otherwise it
indicates something's gone wrong.

--- begin script ---
#!/usr/bin/perl -w

# Open file
open IN, "$ARGV[0]" or die "can't find $ARGV[0]: $!";

# Read it in one slurp
select IN;
undef $/;
select STDOUT;
$file=<IN>;
close IN;

# Remove this string
$count=$file=~s!/usr/X11R6/lib\0!\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0!g;
print "Replaced: $count occurences in $ARGV[0]\n";

# Write the file
open OUT, ">$ARGV[0].out" or die "can't write $ARGV[0].out: $!";
print OUT $file;
close OUT;
--- end script ---

Remco



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: