-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.sh
executable file
·43 lines (38 loc) · 998 Bytes
/
setup.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
38
39
40
41
42
43
#! /bin/bash
#
# setup.sh
#
# Sets this project up using a RAM disk for builds
#
RAMDISKSIZE=512 # in MB
mkdir -p ramdisk
if [ -e .ramdevice ]
then
echo ".ramdevice already exists!"
exit 1
fi
size=$(($RAMDISKSIZE * 1024 * 2)) # size in 512 blocks
hdiutil attach -nomount -nobrowse ram://$size > .ramdevice
ramdevice=$(cat .ramdevice)
newfs_hfs -v swog $ramdevice
mount -t hfs -v $ramdevice ramdisk/
echo "mounted ramdisk"
rootdir=$(realpath .)
for proj in target\
project/target\
cobj/jvm/target cobj/native/target cobj/shared/target\
cobjTests/jvm/target cobjTests/native/target cobjTests/shared/target\
cxx/target\
cxxTests/target\
cxxlib/target\
interop/jvm/target interop/native/target interop/shared/target\
interopTests/jvm/target interopTests/native/target interopTests/shared/target\
objc/target\
objcTests/target
do
echo "setting up $proj"
mkdir -p ramdisk/$proj
rm -rf $proj
ln -s $rootdir/ramdisk/$proj $proj
done
echo "created build directories"