-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sh
executable file
·45 lines (36 loc) · 1.1 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
#!/bin/bash
set -e
cd "`dirname $0`" || { echo "ERROR: Could not enter the repo root directory."; exit 1; }
if [ -z "$1" ]
then
TARGET="all"
else
TARGET="$1"
fi
if [ -z "$PSPDEV" ]
then
echo "PSPDEV not set.."
export PSPDEV=$PWD/pspdev
export PATH=$PATH:$PSPDEV/bin
fi
if command -v psp-config &> /dev/null
then
CONFIG_PATH=`which psp-config`
if [[ x"$CONFIG_PATH" != x"$PSPDEV/bin/psp-config" ]]
then
diff <(echo "$CONFIG_PATH" ) <(echo "$PSPDEV/bin/psp-config") || true
echo "ERROR: pspdev path is different from \$PSPDEV; Multiple installations?"; exit 1;
fi
else
echo "ERROR: No PSP toolchain? Run ./bootstrap.sh"; exit 1;
fi
echo "PSPDEV=$PSPDEV"
echo "TARGET=$TARGET"
if test -f "Code/Makefile"; then
make -j4 --no-print-directory -C Code $TARGET
fi
if test -d "ReleaseCandidate"; then
[ -d Output/RELEASE/%__SCE__SuicideBarbie ] && cp -r Output/RELEASE/%__SCE__SuicideBarbie ReleaseCandidate/
[ -d Output/RELEASE/__SCE__SuicideBarbie ] && cp -r Output/RELEASE/__SCE__SuicideBarbie ReleaseCandidate/
psp-size Output/*/SuicideBarbie*.elf ReleaseCandidate/__SCE__SuicideBarbie/EBOOT.PBP
fi