Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
- Hide mounted volume from applications such as Finder
- Force unmount dmg when installation is finished
  • Loading branch information
npyl committed Mar 25, 2018
1 parent 421d441 commit f887353
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Manage Conky/ConkyInstallerSheetController.m
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,10 @@ - (void)beginInstalling
/*
* detect if XQuartz is installed
*/
if (access(XQUARTZ_PATH, F_OK) == 0)
if (access(XQUARTZ_PATH, F_OK) != 0)
{
[self writeToLog:@"XQuartz is missing, downloading...\n\n"];

//
// Must start the Helper
//
Expand Down
5 changes: 3 additions & 2 deletions Manage Conky/Resources/InstallXQuartz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
curl -L -s -o /tmp/XQuartz.dmg https://dl.bintray.com/xquartz/downloads/XQuartz-2.7.11.dmg

# mount dmg
hdiutil attach /tmp/XQuartz.dmg -mountpoint /Volumes/XQuartz
# (make it invisible to Finder)
hdiutil attach /tmp/XQuartz.dmg -mountpoint /Volumes/XQuartz -nobrowse

# run the intstaller
installer -pkg /Volumes/XQuartz/XQuartz.pkg -target /

# umnount
hdiutil detach /Volumes/XQuartz
hdiutil detach /Volumes/XQuartz -force

# cleanup
rm -f /tmp/XQuartz.dmg

0 comments on commit f887353

Please sign in to comment.