Last active
November 12, 2018 11:58
-
-
Save npu3pak/77587c4d52bd3f4a145441f487e5912b to your computer and use it in GitHub Desktop.
Script creates 4Gb RAM disk and uses it for DerivedData
This file contains hidden or 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
#!/bin/bash | |
readonly disk_path="$(hdid -nomount ram://7800000)" | |
readonly disk_number="$(echo $disk_path | sed 's|/dev/disk||g')" | |
echo $disk_number | |
newfs_hfs -v "DerivedData" "/dev/rdisk$disk_number" | |
diskutil mount -mountPoint ~/Library/Developer/Xcode/DerivedData "/dev/disk$disk_number" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment