Skip to content.
Sections

Quantum Magic & Love Quarks

Personal tools
You are here: Home » Notes » Plone Notes » Archive » 2006 » March » 21 » installing Zopish Products with symlinks
 

installing Zopish Products with symlinks

A method of keeping all the Products in their own 'category' folders, and managing the installation with symlinks (under *nix only AFAIK)

I've found it very useful to keep all the actual product directories in their own category folders, ie:

plonebase - for the current dist or svn bundle
_products_tested
_products_disabled
_products_homegrown
_products_handrolled

and so forth

I use a short sequence of command line scripts like this:

Assuming that the plone Products is in /path/to/Products, the following will make symlinks for all the directories in ./_products_tested/ (for example)

    cd /path/to/_products_tested/

    for i in ./*;do [ -d $i ] && echo ln -s `pwd`/`basename $i` `pwd`/../Products/;done  # test first with echo...

    for i in ./*;do [ -d $i ] &&  ln -s `pwd`/`basename $i` `pwd`/../Products/;done # then roll it


to remove all the symlinks, deinstalling the products listed in a particular category folder, just

    cd /path/to/_products_tested/

    for i in ./*;do [ -d $i ] && echo rm  `pwd`/../Products/`basename $i`;done  # test first with echo...

    for i in ./*;do [ -d $i ] &&  rm  `pwd`/../Products/`basename $i`;done # then roll it


This is very handy for managing upgrades to Plone base etc...


Note that the ` backticks are NOT ' single quotes! under *nix, a command like `pwd` will be replaced with the output of the command. So, `pwd`(print working directory) will give the full path to the current directory.
Note also, that this assumes that the 'category folders' are in the same {Instance Home}directory as ./Products/, so that `pwd`/../Products/ will back-out one level from the current directory to find 'Products'

Posted by pf on 2006-03-21 11:01 PM
 

Powered by Plone