[gobolinux-users] RestoreDefaults

Fabio Mierlo geromao at gmail.com
Fri Aug 12 02:07:24 GMT 2005


It can be improved in the follow way:

1. The InstallPackage can diff the /Programs/App/
  Settings against /Programs/App/Current/Resources/
  Defaults/Settings before the install.
2. If no changes are found it can safely replace the old
  settings with the new one.
3. If they are found the InstallPackage can create a new
  directory Settings.new and notify the user that they
  need to check the new settings.
4. And the user can do a simple diff of the Settings
  against Settings.new to see the differences.  

Off course it can be a default option due the interactivity
whit user.

On 8/11/05, Jonatan Liljedahl <lijon at kymatica.com> wrote:
> On Thu, 11 Aug 2005 19:27:03 -0500
> Carlo Calica <ccalica at gmail.com> wrote:
> 
> > On 8/11/05, Jonatan Liljedahl <lijon at kymatica.com> wrote:
> > > we should have a script named RestoreDefaults that copied the
> > > default settings from Resources/Default/Settings to Settings... Or
> > > maybe implement this as a cmdline option to SymlinkProgram.
> >
> > Great idea.  One suggestion.  Rename /P/Foo/Settings to
> > /P/Foo/Settings.modified before copying the defaults.  Maybe make a
> > .modified-1, .modified-2, etc as needed.
> 
> Yes, that would be very nice. =) Or maybe .backup is a better name...
> I don't think there's a need to number them, even if that would be nice.
> 
> What about this:
> 
> #!/bin/sh
> OLD=/Programs/$1/Settings
> NEW=/Programs/$1/Current/Resources/Default/Settings
> [ -d $OLD ] && mv -f $OLD $OLD.backup
> mkdir $OLD
> cp -a $NEW/* $OLD/
> 
> /Jonatan    -=( http://kymatica.com )=-
> _______________________________________________
> gobolinux-users mailing list
> gobolinux-users at lists.gobolinux.org
> http://lists.gobolinux.org/mailman/listinfo/gobolinux-users
> 


-- 
fabio.m

"Bom é o que faz mal" -- Matanzza


More information about the gobolinux-users mailing list