Bug 509198 - Sisyphus - directly mount dmg installer, r=ctalbert.

This commit is contained in:
Bob Clary 2009-08-18 00:29:59 -07:00
Родитель 241aec6117
Коммит c4c1cac6d1
2 изменённых файлов: 7 добавлений и 22 удалений

Просмотреть файл

@ -1,9 +0,0 @@
#!/usr/bin/expect
spawn hdiutil attach $argv
expect {
"byte" {send "G"; exp_continue}
"Y/N" {send "Y\r"; exp_continue}
}

Просмотреть файл

@ -123,24 +123,18 @@ else
;;
darwin)
# answer license prompt
result=`$TEST_DIR/bin/hdiutil-expect.ex $filename`
# Now get the volume data
#result=`hdiutil attach $filename`
disk=`echo $result | sed 's@.*\(/dev/[^ ]*\).*/dev.*/dev.*@\1@'`
# remove the carriage return inserted by expect
volume=`echo $result | sed "s|[^a-zA-Z0-9/]||g" | sed 's@.*\(/Volumes/.*\)@\1@'`
echo "disk=$disk"
echo "volume=$volume"
if [[ -z "$disk" || -z "$volume" ]]; then
error "mounting disk image: $result" $LINENO
# assumes only 1 mount point
mkdir -p /tmp/sisyphus/mount
if ! hdiutil attach -mountpoint /tmp/sisyphus/mount $filename; then
error "mounting disk image" $LINENO
fi
for app in $volume/*.app; do
for app in /tmp/sisyphus/mount/*.app; do
cp -R $app $executablepath
done
hdiutil detach $disk
# requires 10.4 or later
hdiutil detach /tmp/sisyphus/mount
;;
esac