[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
DefineClasses in editfiles
From: |
Steve Wray |
Subject: |
DefineClasses in editfiles |
Date: |
Mon, 31 May 2004 16:11:11 +1200 |
User-agent: |
KMail/1.6.1 |
I need to run a shellcommand to unzip a file,
then an editfiles to edit contents of something in that file,
then another shellcommand to zip it up again.
Like this;
shellcommands:
Mozilla_Update::
"/usr/bin/unzip US.jar"
chdir=/usr/lib/mozilla-firefox/chrome
define=Mozilla_Ready_To_Edit
then
editfiles:
Mozilla_Ready_To_Edit::
# Having unzipped the darn thing we can now edit it
{ /usr/lib/mozilla-firefox/chrome/locale/US/browser-region/region.properties
ReplaceAll "^homePageDefault=.*mozilla.*$" With
"homePageDefault=http://intranet"
ReplaceAll "^browser.startup.homepage=.*mozilla.*$" With
"browser.startup.homepage=http://intranet"
ReplaceAll "^browser.throbber.url=.*mozilla.*$" With
"browser.throbber.url=http://intranet"
ReplaceAll "^startup.homepage_override_url=.*mozilla.*$" With
"startup.homepage_override_url=http://intranet"
# and once its edited we are ready to zip it back up:
DefineClasses "Mozilla_Ready_To_Zip"
}
then
shellcommands:
Mozilla_Ready_To_Zip::
"/usr/bin/zip -rm US.jar locale"
chdir=/usr/lib/mozilla-firefox/chrome
I've tried this with the two shell commands in one shellcommands definition,
and seperately like I show here.
The control section looks like this;
actionsequence = ( shellcommands editfiles shellcommands )
Yet
# cfagent -K -v -DMozilla_Update
does the first shellcommand, does the editfiles and does not do the second
shellcommand.
It looks as if the
DefineClasses "Mozilla_Ready_To_Zip"
does't actually define the class.
(I've tried with and without the quotes).
The documentation says;
DefineClasses "class1:class2:..."
Activate the following colon, comma or dot-separated list of classes if and
only if the file is edited.
Any suggestions?
Thanks!
- DefineClasses in editfiles,
Steve Wray <=