-
Notifications
You must be signed in to change notification settings - Fork 10
/
xc-launch.sh
executable file
·39 lines (24 loc) · 2.07 KB
/
xc-launch.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
# xc-launch.sh: script to launch Xcode using a RAM disk to store intermediate build products
# written by Diego Freniche
# distributed under the MIT & Anyone But Richard Stallman Licenses ;-)
# delete /volumes/ramdisk directory (in case you've started Xcode without calling this script 1st)
rm -rf /Volumes/ramdisk
# create a 4GB RAM disk. Mounting it in /Volumes/ramdisk
# if /Volumes/ramdisk already exist, do nothing
if [[ $(mount | awk '$3 == "/Volumes/ramdisk" {print $3}') != "" ]]; then
echo /Volumes/ramdisk is mounted
else
diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://8475854`
fi
open -a Xcode
echo "
____________________________
/ /\ ██╗ ██╗ ██████╗ ██╗ █████╗ ██╗ ██╗███╗ ██╗ ██████╗██╗ ██╗
/ _/ /\ ╚██╗██╔╝██╔════╝ ██║ ██╔══██╗██║ ██║████╗ ██║██╔════╝██║ ██║
/ xc-launch / \/ ╚███╔╝ ██║█████╗██║ ███████║██║ ██║██╔██╗ ██║██║ ███████║
/ /\ ██╔██╗ ██║╚════╝██║ ██╔══██║██║ ██║██║╚██╗██║██║ ██╔══██║
/___________________________/ / ██╔╝ ██╗╚██████╗ ███████╗██║ ██║╚██████╔╝██║ ╚████║╚██████╗██║ ██║
\___________________________\/ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚═╝ ╚═╝
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ... your derived data folder in RAM
"