On Mon, 2006-06-12 at 14:12 +0200, Eric Spakman wrote: > Hello Nataneal,
hi. > > Now, run a utility that: > > > > > > diff -u foo.conf foo.conf.new > > > > and ask: would you like to: 1) keep the old config. > > 2) replace old with new. > > 3) do nothing. > > > > > > conf=foo.conf case $choice in 1) rm $conf.new;; > > 2) mv $conf.new $conf;; > > esac > > > > That would only require diff. (and a diff applet is already in busybox > > svn) > > > Cool, but user changes are lost if you choose the option to update the > config file. I was more thinking about something that updates the new > config file with changes from the old one, which is probably almost > impossible ;) Nothing is impossible. The "impossible" just takes longer time. :-) Gentoo's etc-update does excatly this. It has a "merge" option in addtion to the above (and "replace all"). If you do merge, etc-update will display evey diff-chunk giving you a possibility to use the chunk from new file or use the current one. mergemaster in freebsd does someting similar. It shouldn't impossible do that in shell with diff/top. But I guess the only sane thing would be to write a C app for that. Maybe later... -- Natanael Copa _______________________________________________ leaf-devel mailing list leaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/leaf-devel