On Thu, Dec 1, 2011 at 3:06 PM, Darrell Anderson humanreadable@yahoo.com wrote:
Getting the script to ask permission to migrate if
already in X is a
challenge because the user's profile partially exists
when
KPersonalizer starts. Therefore any migration needs to
happen before
even an empty $HOME/.trinity exists. Can KDialog
commands be used at
that point? If not then the only option is xmessage
(eew).
Just an idea, I don't know if it's possible:
- Start KDE with a temporary KDEHOME (mktemp)
- Copy $HOME/.kde to $HOME/.trinity (if desired)
- Copy temporary files from $KDEHOME to $HOME/.trinity (if
needed)
- Set KDEHOME to $HOME/.trinity
(or restart KDE, but it isn't elegant)
To all:
I uploaded the proposed migration script in bug report 705. This is a proposed script.
My ego is not that big. Feel free to improve the script in all ways! I added comments in the areas I know needs improvement right now.
Yet overall the script works wonderfully well here. So we're off to a good start. :)
Darrell
To unsubscribe, e-mail: trinity-devel-unsubscribe@lists.pearsoncomputing.net For additional commands, e-mail: trinity-devel-help@lists.pearsoncomputing.net Read list messsages on the Web archive: http://trinity-devel.pearsoncomputing.net/ Please remember not to top-post: http://trinity.pearsoncomputing.net/mailing_lists/#top-posting
You might want to specify /bin/bash instead of /bin/sh. Debian and I think Ubuntu also, use "dash" as default "sh". I was testing your script a little and got a "Bad substitution" error when Wait_For_Response is called. I don't know exactly why but there is info here:
https://wiki.ubuntu.com/DashAsBinSh
After further reading that page, I believe it's the substring expansion in that function that is the problem. Also on that page is mention of a "checkbashisms" script which I found here:
http://sourceforge.net/projects/checkbaskisms/files/2.0.0.2/
I ran that script on your script and got:
possible bashism in migratekde3 line 69 (${foo:3[:1]}): while [ "${response:0:1}" != "Y" ] && [ "${response:0:1}" != "y" ] && [ "${response:0:1}" != "N" ] && [ "${response:0:1}" != "n" ]; do possible bashism in migratekde3 line 74 (read with option other than -r): read -er -n 1 -p "$1 (y/n): " response