Hazel Mac Sync
A shell script to work with Hazel to automatically install apps on OS X.
How To Sync iCloud To Dropbox In 4 Easy Steps. Use Hazel to sync changes. The latest update to Hazel brought to it a sync option and one that will be irreplaceable to cloud-based storage users. Dec 27, 2019 Hazel 4.4.4 - Create rules for organizing and cleaning folders. Download the latest versions of the best Mac apps at safe and trusted MacUpdate.
Hazel Mac Sync To Iphone
- Oct 26, 2019 Step 3. If you want to sync 2 folders between iCloud and Google Drive, you can use a file sync tool to do that. For me, I like using Hazel for Mac because I can choose to sync what types of files on certain conditions that I can specify. For Windows, you can use File Juggler, which works the same as Hazel.
- Mar 12, 2019 I should also probably mention Hazel by Noodlesoft. Hazel is a great investment for any Mac owner. File/folder synchronization is just one of the many, many system actions that can be automated through Hazel. It's a time-tested and well-loved app from a venerable developer. Definitely worth checking out.
The 'Problem'
Many Mac apps come in '.dmg' files, and require the same set of steps:
Mount the .dmg (which will then appear in /Volumes/SomeNameHere/)
Find the .app inside the /Volumes/SomeNameHere/
Copy the .app from /Volumes/SomeNameHere/ to /Applications/
Say 'yes' when asked if you want to replace it
Wait for the install to finish
Eject the .dmg
One Solution
Most of those steps can be automated, but there are some details which need to be considered:
How can you tell if a new volume is a DMG?
Assuming it is determined to be a DMG, how do you identify what needs to be installed? Delicious emily's cook & go free download for pc. There are several possibilities, the first two is the most likely, but the others need to be considered:
There is one .app which needs to be copied to /Applications/. (This is the most common situation.)
it is a .pkg file which needs to be installed (second most common)
There is one .app but it is an installer (iTunes, Default Folder X, etc)
it is a prefPane which needs to be installed either to ~/Library/PreferencePanes/ or /Library/PreferencePanes/
there may be an .app and a .pkg file (MakeMKV)
there may be more than one app in the .dmg (for example: MailMate's DMG also includes SpamSieve)
there may be more than one app and more than one pkg
Once we have determined what needs to be installed, there are more considerations to make:
Is the app already installed?
is it currently running?
does it have any 'helper' apps that are running?
if the app or any of its helper apps are running, can they be quit safely (or at least, relatively safely)?
Is the version we are considering installing newer than the currently installed version?
- if no, does that mean we should stop the installation or just inform the user, who might want to replace a newer, buggier version of an app with an older version? (Our answer may depend somewhat on what we do with apps that are already installed.)
{Other?}
Version 0.01 (2014-01-01)
To start with I decided to only deal with the most common scenario: a DMG is mounted and it has an app which is not an installer.
The script will be called via Hazel. Choose /Volumes/ as the Folder and then create a new rule using the '+' under “Rules”:
This is the rule that I created:
'Dated Added' 'is after' 'Date Last Matched' means that it will run once for every new item added to /Volumes/ (so the script will need to be smart enough to tell when it is not being used on a dmg).
The two Display Notifications are mostly for debugging purposes, so I can tell when the recipe has started and finished.
Hazel Mac Sync Video
Faux Hazel Syncing
Hazel Mac Sync Battle
Hazel doesn't sync its rules across Macs, but you can sort of fake it when you are creating a rule which points to a shell script on Dropbox.
Hazel Mac Sync Download
Create the rule on one Mac, including the 'Run Shell Script' part. Instead of using an embedded script, use an external script file which is saved on Dropbox. The full path to
hazel-newvolume.sh
is/Users/luomat/Dropbox/bin/hazel-newvolume.sh
on all of my Macs which sync via Dropbox. You can put it wherever you want in your Dropbox, as long as the paths are the same on all of your Macs. (Note: on one computer which does not have enough internal storage for my Dropbox, I told the Dropbox.app to put its folder on/Volumes/External/Dropbox
but then I linked it to/Users/luomat/Dropbox/
.)Click the gear icon in Hazel and Export 'Volumes' rules from Hazel. (see image) I'd suggest putting the
Volumes.hazelrules
file in Dropbox to make it easier to import on your other Macs.
- On the other Macs, make sure you have an entry for /Volumes/ under Folders. You can then import the
Volumes.hazelrules
file by either: a) using the same 'gear' menu in the above image (choose 'Import Rules…'), or b) drag theVolumes.hazelrules
file to the /Volumes/ item under 'Folders' or c) simply double-click theVolumes.hazelrules
file and choose to import it into Volumes:
Once I have exported this Hazel rule on one Mac and imported it on the other Mac(s), any changes I make to the hazel-newvolume.sh
script will be reflected on all of the computers which sync via Dropbox.