Created
October 31, 2019 00:03
-
-
Save saantiaguilera/877cd7c7c48690f2330cb769e6f14a50 to your computer and use it in GitHub Desktop.
Volume manager for abstracting code sources
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this in your .zshrc or .bash_profile or wherever you want | |
mount() { | |
# Note that I save all my sparse images in ~/Projects/ | |
hdiutil attach ~/Projects/$1.dmg.sparseimage -mountpoint /Volumes/$1 | |
} | |
unmount() { | |
hdiutil detach /Volumes/$1 | |
} | |
createSparseImage() { | |
# 40g as max for sparse increment of the image. Tune it if you want more or less | |
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 40g ~/Projects/$1.dmg | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage: