-
Notifications
You must be signed in to change notification settings - Fork 0
/
SoC.sh
43 lines (37 loc) · 1.22 KB
/
SoC.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
# export WITHGDB=NO to avoid using GDB where it is a hinderance.
export WITHGDB=NO
binDir="$(pwd)/build/naev-0.10.4-lin64-$(lsb_release -r -s)"
NAEVdatDir="$(pwd)/SoC-dev-dat/work/NAEV-dat-core"
SoCdatDir="$(pwd)/SoC-dev-dat/work/SoC-dat-dev"
wrapper() {
if [[ ! "$WITHGDB" =~ "NO" ]] && type "gdb" > /dev/null 2>&1; then
export ASAN_OPTIONS=abort_on_error=1
DRI_PRIME=1 exec gdb -x "$binDir/.gdbinit" --args "$@"
else
DRI_PRIME=1 exec "$@"
fi
}
if [ ! -d "$binDir" ]; then
echo "ERROR : $binDir does not exist."
echo "Please compile NAEV for your system by running the following commands :"
echo " cd <Your NAEV repo copy>"
echo " meson setup $binDir ."
echo " cd $binDir"
echo " meson compile"
exit
fi
if [ ! -d "$NAEVdatDir" ]; then
echo "ERROR : $NAEVdatDir does not exist."
echo "Please check the NAEV vanilla data folder exists."
exit
fi
if [ ! -d "$SoCdatDir" ]; then
echo "ERROR : $SoCdatDir does not exist."
echo "Please check the Stars of Call development data folder exists."
exit
fi
# Run NAEV within a dedicated folder
# Writing from editors is done on hard-coded "../dat" from this path
cd run/SoC
wrapper "$binDir/naev" -devmode -d $SoCdatDir -d $NAEVdatDir