[ic] makecat and postcopy_commands

Mike Heins mikeh@minivend.com
Fri, 15 Sep 2000 09:00:18 -0400


Quoting Hans-Joachim Leidinger (jojo@www.buchonline.net):

> Notice the "mkdir /www/buchonline.net/ic/catalogs/icsimple/images"!
> It seems to me, the file "postcopy_commands"
> 
> ---------snip of post_copy_commands----------
> ln -s __MVC_DOCUMENTROOT____MVC_IMAGEURL__ __MVC_CATROOT__
> To enable image upload feature, you need to make a symbolic
> link of the image base directory into your catalog directory.
> ---------snip of post_copy_commands----------
> 
> should be as
> 
> ---------snip of post_copy_commands----------
> ln -sf __MVC_IMAGEDIR__ __MVC_CATROOT__
> To enable image upload feature, you need to make a symbolic
> link of the image base directory into your catalog directory.
> ---------snip of post_copy_commands----------
> 
> It this correct?
> 
> Thanks!
> 

Yes, you are very right about the path. Thanks!

As regards ln -sf, no, I don't think so. I don't know an easy solution;
a unix command that might help is:

    find __MVC_CATROOT__ -type l -maxdepth 1 | xargs rm; ln -s __MVC_IMAGEDIR__ __MVC_CATROOT__

but that is a bit of a mouthful and I am not sure of portability. Probably
better is writing a little perl script:

  perl -e 'map { unlink $_ if -l $_ } glob "__MVC_IMAGEDIR__/*"'; \
  ln -s __MVC_IMAGEDIR__ __MVC_CATROOT__

That will be pretty incomprehensible to people, but it would work.

We are working on the installer, so we will look at it.  Thanks for the
work, Jojo.

-- 
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH  45056
phone +1.513.523.8220 fax 7501 <heins@akopia.com>

The U.S. Senate -- white male millionaires working for YOU!  -- Dave Barry