gnuzilla-dev
[Top][All Lists]
Advanced

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

Re: Patch for use Peder Stray's perl-rename package


From: Joan Figueras
Subject: Re: Patch for use Peder Stray's perl-rename package
Date: Fri, 23 Apr 2021 16:17:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1

On 21/4/21 20:19, bill-auger wrote:

i made that change to 'makeicecat', because the arch
'perl-rename' does not support the features used by makeicecat

i packaged the 'Robin Barker' version to support 'makeicecat'
unmodified; which seems to be the PERL upstream supported
version, and the one that ubuntu/trisquel has - that version
supports the features used by 'makeicecat' - you could use the
'perl-file-rename' package if you like, to avoid carrying that
patch

https://metacpan.org/release/File-Rename
https://git.parabola.nu/abslibre.git/tree/pcr/perl-file-rename/PKGBUILD

the 'pederst' version packaged in arch, appears to be
unmaintained; the arch package specified the wrong license, and
no other arch package depends on it - for all those reasons, i
wrote to the arch packager about six months ago, suggesting to
change upstreams; but i have not gotten any reply - so, i would
expect carrying that patch for a long time, if not forever

the usage is trivial; so we have also discussed re-writing the
script to use 'find' instead; which would eliminate the entire
mess - IMHO, that would be a better change to make to makeicecat
- could yo do that?

I've tried several things, but only this works:

  $ find . -type f -name "*fennec*" -execdir bash -c 'mv -v ${1} 
${1/fennec/firefox}' _ {} \;

It implies start a subshell for every match, but other solutions with loops have the same 
"problem".

I tried also an awk script, but my knowledge about awk's regex is "not good", 
so couldn't make it work. My last attempt:

  $ find . -name "*fennec*" -type f | awk -v mvCmd='mv "%s" "%s"\n' '{ old = $0; 
sub(/(fennec)(?!.*\1)/,"firefox"); printf mvCmd,old,$0; }'


Cheers
--
Joan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]