[gobolinux-users] Re: RestoreDefaults
geromao at gmail.com
Fri Aug 12 16:17:39 GMT 2005
I suggest something like your second suggestion,
but your logic is better due the user less interactivity.
You get the point. Off course we must think what to
do when the user change the settings.
I always do that when I install a new Script version.
Another thing that I was thinking is about batch mode
of Compile and InstallPackage. Sometimes they must
do a hard decision or just notify the user about warnings.
In this cases they can save this information in a file
and show to user at the end of Install/Compilation.
The last requested feature of the day, is a new option for
Compile/InstallPackage don't check the version of
On 8/12/05, Hisham Muhammad <hisham.hm at gmail.com> wrote:
> Let me see if I understood what you suggested:
> I have App 1.0 installed in my machine, and I want to InstallPackage App 2.0.
> We're talking about three sets of Settings here:
> (a) /Programs/App/Settings (my customized settings)
> (b) /Programs/App/1.0/Resources/Defaults/Settings
> (c) /Programs/App/2.0/Resources/Defaults/Settings
> Compare (b) and (c).
> If they are the same, keep using (a).
> If they differ then some configuration format may have changed. Notify
> the user and offer to replace (a) with (c), keeping a backup of (a).
> Did I get it right? Sounds like a great idea to me.
> And perhaps this can be further improved, like this:
> If (b) and (c) are different, compare (a) and (b). If (a) and (b) are
> the same, the user is still using the defaults from version 1.0, which
> means we can safely replace them with the new defaults of version 2.0,
> (c), without interactivity.
> I like this! Who wants to implement it? :)
> -- Hisham
> On 8/11/05, Fabio Mierlo <geromao at gmail.com> wrote:
> > 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
> > _______________________________________________
> > gobolinux-users mailing list
> > gobolinux-users at lists.gobolinux.org
> > http://lists.gobolinux.org/mailman/listinfo/gobolinux-users
> gobolinux-users mailing list
> gobolinux-users at lists.gobolinux.org
"Bom é o que faz mal" -- Matanzza
More information about the gobolinux-users