From kde-core-devel Wed Nov 11 18:12:35 2009 From: Rivo Laks Date: Wed, 11 Nov 2009 18:12:35 +0000 To: kde-core-devel Subject: Re: Renaming configuration files Message-Id: <200911112012.36035.rivolaks () hot ! ee> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=125796321426332 Ühel kenal päeval (kolmapäev 11 november 2009) kirjutas Lubos Lunak: > On Wednesday 11 of November 2009, Rivo Laks wrote: > > Hi > > > > I need to rename a configuration file. Usually it should be doable with > > kconf_update, but I need the new name to include the computer's current > > hostname. And as far as I can see, kconf_update doesn't let me have e.g. > > an expression as the new filename. > > So, any ideas on how to do this, preferably with kconf_update so that it > > wouldn't be necessary to put this logic into the application code? > > You can use Script= in the .upd file and let the script do whatever needs > to be done. KConf_update should still handle things like checking whether > the update needs to be done (but better check). See e.g. in kwin/data/. I was under impression that the script is basically executed like this: cat old_file | script > new_file where old_file and new_file are specified in the .upd file and are fixed. Or do you mean that I should just write to an arbitrary file in the script and then output nothing? Rivo