Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Shell scripts checking for old iTunes files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Shell scripts checking for old iTunes files
Authored by: ashill on Nov 03, '01 04:21:02PM
In the same Resources folder of the iTunes installer package, the file VolumeCheck checks for and deletes the receipt from the previous install of iTunes:
#!/bin/sh

# if current iTunes pkg exists, delete it b/c of Installer bug
if [ -e $1Library/Receipts/iTunes.pkg ] ; then
	rm -rf $1Library/Receipts/iTunes.pkg 2> /dev/null
fi

# return do nothing status to Installer
exit 0
I'm not sure what that first comment in the script means. Presumably, there's some bug in the installer that prevents updating an old version succesfuly; therefore, they just delete the remnants of the old version. As you noted, Rob, the bug in the shell script is the one that deletes every file on the hard drive; I wonder what the bug in the Installer itself is.
By the way, $1 and $2 (and $n, where n is an integer) are not normal shell variables. I'm not very experienced with shell scripts, but, as I understand it, $1 refers to the first argument on the command line call, $2 to the second, etc. Therefore, if someone could find the script in there that executes the preflight script, we should be able to figure out the problem more preciesly. -Alex Hill

[ Reply to This | # ]