Only two problems:
This irritated me, so I blew a little time fixing the problem (for the most part). The script below will handle pretty much whatever you want it to. I called my copy hdi-ie.sh and put it in my ~/bin folder. To use it, I just open a terminal window, cd into my downloads folder, and do "hdi-ie.sh *.dmg", or if I want to be more specific maybe something like "hdi-ie.sh AACelerator1.0.dmg b*.dmg EV*.dmg BBEdit_stuff*bbedit*.dmg", and it works like a charm.
Known issues:
The Script:
#!/bin/sh
# hdi-ie.sh ver. 1.1 2002-03-19 public domain freeware
# by Stanton McCandlish, <mech[@-sign goes here]well.com>
# Tells hdiutil to convert the named (wildcards are supported)
# .dmg disk images to "internet-enabled" format, so that they
# dump their contents to a folder and trash themselves when
# mounted. Handy!
#
# Many thanks to VitaminMoo on XHintsChat for debugging help.
# Usage: hdi-ie.sh <file[s]>
if [$1 = ""]; then
echo "Usage: hdi-ie.sh <file[s]>"
else
for file in "$@"; do
echo "$file" # shows what the expanded values are.
hdiutil internet-enable -yes "$file"
done
fi
For total Unix newbies: To make use of this script, open the Terminal application (should be in /Applications -> Utilities). Type the following (each line followed with a return (or enter) keystroke), in the order they appear here:
cd ~
mkdir bin
cd bin
pico hdi-ie.sh
This starts up the pico text editor. Copy the above script, from (and including) "#!/bin/sh" all the way through "fi", and paste that into pico. Then do ctrl-x (to exit pico), answer "y" to the save question that appears, and hit return/enter key when asked if you want to accept the filename. You will now be back at the Unix prompt. Type "exit" (without the quotes) and hit return/enter to leave the Terminal session.]
Now, when you feel like converting some .dmg images, open a terminal window (a different one; the script will not be available to you unless you either type "rehash" (without the quotes), refer to the script by its path as well as filename, i.e. "~/bin/hdi-ie.sh", or launch a new terminal window other than the one in which you first saved the script in pico), then "cd" into the directory containing the offending disk images, and run them through the script ("hdi-ie.sh [file(s)] ").
Mac OS X Hints
http://hints.macworld.com/article.php?story=20030319081832804