This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [BUG] in the generic packaging script


On Thu, 12 Jun 2003, Charles Wilson wrote:
> Ronald Landheer-Cieslak wrote:
> 
> > I'm starting from scratch on the aspell dict packs, because I don't quite 
> > remember where I left off. I downloaded a fresh generic script and named 
> > it aspell-en-0.51.0-1.sh. I added a debug functions available from the 
> > command-line to see whether the different variables were set OK and - lo 
> > and behold - they weren't.
> > 
> > The results: 
> > $ ./aspell-en-0.51.0-1.sh vars
> > topdir = /home/RLandheer/aspell
> > PKG = aspell-en
> > VER = en-0.51.0
> > REL = 0.51.0-1
> > FULLPKG = aspell-en-en-0.51.0-0.51.0-1
> > 
> > I am no wizz at sed regular expressions (I know a lot more about the 
> > Perl-compatible variety) bu I am fairly certain the bug is in them. I'll 
> > try to patch it up but if anyone beats me to it, I certainly won't mind :)
> 
> Try this instead:
> 
> export PKG=`echo $tscriptname | sed -e 's/\-[^\-]*\-[^\-]*$//'`
> export VER=`echo $tscriptname | sed -e "s/${PKG}-//" -e 's/\-[^\-]*$//'`
> export REL=`echo $tscriptname | sed -e "s/${PKG}-${VER}-//"`
Works like a charm, thanx :)

rlc



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]