Skip to content

Commit f887353

Browse files
committed
Improvements
- Hide mounted volume from applications such as Finder - Force unmount dmg when installation is finished
1 parent 421d441 commit f887353

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Manage Conky/ConkyInstallerSheetController.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,10 @@ - (void)beginInstalling
145145
/*
146146
* detect if XQuartz is installed
147147
*/
148-
if (access(XQUARTZ_PATH, F_OK) == 0)
148+
if (access(XQUARTZ_PATH, F_OK) != 0)
149149
{
150+
[self writeToLog:@"XQuartz is missing, downloading...\n\n"];
151+
150152
//
151153
// Must start the Helper
152154
//

Manage Conky/Resources/InstallXQuartz.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414
curl -L -s -o /tmp/XQuartz.dmg https://dl.bintray.com/xquartz/downloads/XQuartz-2.7.11.dmg
1515

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

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

2223
# umnount
23-
hdiutil detach /Volumes/XQuartz
24+
hdiutil detach /Volumes/XQuartz -force
2425

2526
# cleanup
2627
rm -f /tmp/XQuartz.dmg

0 commit comments

Comments
 (0)