Skip to content

Instantly share code, notes, and snippets.

@prafullakumar
Created May 12, 2020 13:04
Show Gist options
  • Save prafullakumar/24e08e6ec81eb16564c702100518057a to your computer and use it in GitHub Desktop.
Save prafullakumar/24e08e6ec81eb16564c702100518057a to your computer and use it in GitHub Desktop.
#!/bin/bash
#Set the name of the ram disk
RAMDISK = "xcodeDeriveData"
#Set the size of the ram disk, here is 2048 MB
SIZE = 2048
#space allocated to the xcodeDeriveData
diskutil erasevolume HFS + $RAMDISK `hdiutil attach -nomount ram://$[SIZE * 2048]`
#Open the metadata index. This is necessary if you use Xcode's internal debugging tools. Because debugging tools use metadata indexes to query symbolic links
mdutil -i on /Volumes/$RAMDISK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment