Quote:
Originally Posted by
xbin
Set your script in debug mode by adding set -x on the next line after the shebang. This will display the value of your variables.
Thanks, that comes in handy! But the results only show what I already knew. But I got a little further. I thought maybe it just needs more time. So I put 40 seconds after the installer command and now it did say version NEW. Then I changed it to 20 seconds and again version NEW. But when I changed it to 10 seconds it said version OLD.
The strange thing is that when I look at the actual .plugin in Finder during the installation, the version almost directly changes to NEW. After that the sleep command runs for 10 seconds. After the ten seconds it still reads out version OLD.
So somehow it does cache the information somewhere...
---------- Post updated 03-01-13 at 11:02 AM ---------- Previous update was 02-01-13 at 02:34 PM ----------
Oke,
So I found another workaround, not a real solution. The plugin has besides an Info.plist also a Version.plist. So I've done some testing.
If I use the CFBundleShortVersionString from the Version.plist for the installedversion as well as the newlyinstalledversion I get the same problem. But If I use the Version.plist for the installedversion and the Info.plist for the newlyinstalledversion then it works properly. Even without the 10 seconds sleep.
Since this script can be used for more software other than this plugin this is not a real solution. Because not all plugins or apps have the version.plist.
I also tried
unset installedversion but that didn't help either...
---------- Post updated at 11:54 AM ---------- Previous update was at 11:02 AM ----------
I also found something in another post that maybe will help finding a solution:
Quote:
When you run a script or program, it gets a copy of your current environment. But the copy is unconnected. Change the child and the parent remains the same, and vice versa.