Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 62348 Details for
Bug 97530
eclasses for mounting dmg's and installing .apps
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
macos.eclass
macos.eclass (text/plain), 1.93 KB, created by
Miles Lubin
on 2005-06-30 12:38:20 UTC
(
hide
)
Description:
macos.eclass
Filename:
MIME Type:
Creator:
Miles Lubin
Created:
2005-06-30 12:38:20 UTC
Size:
1.93 KB
patch
obsolete
># Copyright 2005 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ > ># This eclass provides the utilities for unpacking dmg's and installing an os X application > >ECLASS=macos >INHERITED="$INHERITED $ECLASS" > ># since in most dmg's there isnt a ${P} folder >S=${WORKDIR} > ># unpack_dmg(file) ># unpacks given dmg to ${WORKDIR} >unpack_dmg() { > > if [ ! -f /usr/bin/hdiutil ]; then > die "Missing hdiutil - Mac OS X required" > fi > > location=$(mktemp -dp ${T}) > DMGPATH=${DISTDIR}/${1} > hdiutil attach "$DMGPATH" -mountpoint $location >/dev/null 2>&1 || die "mount failed" > ditto --rsrc ${location} ${WORKDIR} > hdiutil detach $location >/dev/null 2>&1 || die "unmount failed" >} > ># doapp(location) ># installs the given .app >doapp() { > for app in $@; do > > if ! [[ $app = *.app ]] && ! [ -d $app ]; then > # can't install this > continue > fi > > DIE=0 > tmpfile=$(mktemp -p ${T}) # yep, this is bad, I'm open to suggestions > einfo "Checking for broken symlinks" > # it appears that many .apps have broken symlinks, > # while this doesnt show up in normal use, it breaks emerge > find "$app" -name "*" >$tmpfile > while read filename; do > if [ -L "$filename" ] && [ ! -e "$filename" ]; then > eerror "Broken symlink - $filename" > DIE=1 > fi > done <$tmpfile > rm $tmpfile > # don't die until we have a list of the broken links > if [ $DIE -ne 0 ]; then > die "broken symlinks" > fi > einfo "Copying $app" > dodir /Applications > APPPATH=${D}/Applications/`basename "$app"` > ditto "$app" $APPPATH > chown -R root:admin $APPPATH > > done >} > ># remove_broken_links(location) ># remove all broken symlinks in the given app ># verify that the modified app works before using this ># but if the app works with the broken link, it will probably work without it >remove_broken_links() { > find "$1" -name "*" | while read filename; do > if [ -L "$filename" ] && [ ! -e "$filename" ]; then > ewarn "Removing broken link - $filename" > rm "$filename" > fi > done >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 97530
: 62348 |
62349
|
62351
|
62353