forked from JustSid/Firedrake
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·46 lines (38 loc) · 1.13 KB
/
build.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
44
45
46
#!/bin/bash
# Firedrake build script
# Set USESSH to true to build Firedrake remotely using SSH, otherwise it will build Firedrake on the local machine
# Note though that running Firedrake via qemu always happens on the local machine
USESSH=true
# Settings for the remote host
USER="justsid"
HOST="192.168.178.38"
REMOTE_PATH="/mnt/hgfs/Firedrake"
# Settings for the local host
BASEDIR=$(dirname $0)
QEMU_NET="-net nic,model=rtl8139 -net user"
QEMU_CPU="-cpu core2duo"
if [ $# -eq 0 ]; then
if $USESSH ; then
ssh "$USER@$HOST" "cd $REMOTE_PATH; make install; exit"
else
make install
fi
exit 0
fi
if [ "$@" == "--clean" ]; then
if $USESSH ; then
ssh "$USER@$HOST" "cd $REMOTE_PATH; make clean; exit"
else
make clean
fi
exit 0
fi
if [ "$@" == "--run" ]; then
qemu-system-i386 $QEMU_CPU $QEMU_NET "$BASEDIR/boot/Firedrake.iso"
exit 0
fi
if [ "$@" == "--debug" ]; then
qemu-system-i386 -d int,cpu_reset -no-reboot -no-shutdown $QEMU_CPU $QEMU_NET "$BASEDIR/boot/Firedrake.iso"
exit 0
fi
echo "No argument to build, --clean to clean all targets, --run to start in qemu and --debug to start in qemu with additional debug flags!"