-
Notifications
You must be signed in to change notification settings - Fork 7
/
bootstrap.sh
executable file
·65 lines (43 loc) · 1.43 KB
/
bootstrap.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
# apt install autoconf automake bison flex gcc-9 libncurses-dev make subversion texinfo wget libusb-dev build-essential libreadline-dev
# or
# brew install autoconf automake flex gcc@9 ncurses make subversion texinfo wget libusb libusb-compat sdl
set -e
cd "`dirname $0`" || { echo "ERROR: Could not enter the repo root directory."; exit 1; }
export PSPDEV=$PWD/pspdev
export PATH=$PATH:$PSPDEV/bin
if command -v psp-config &> /dev/null
then
CONFIG_PATH=`which psp-config`
if [[ x"$CONFIG_PATH" != x"$PSPDEV/bin/psp-config" ]]
then
echo "ERROR: pspdev path is different from \$PSPDEV; Multiple installations?"; exit 1;
fi
echo "PSPDEV=$PSPDEV"
exit 0;
fi
# ancient homebrew psptoolchain
if test ! -d "psptoolchain"; then
git clone https://github.com/erique/psptoolchain.git || { exit 1; }
fi
git submodule update --init --remote || { exit 1; }
cd psptoolchain || { exit 1; }
git checkout master || { exit 1; }
git pull --ff-only || { exit 1; }
if test -d $PSPDEV; then
rm -r $PSPDEV || { exit 1; }
fi
./toolchain.sh || { exit 1; }
git clean -fdx || { exit 1; }
cd .. || { exit 1; }
# somewhat recent psplink
if test ! -d "psplinkusb"; then
git clone https://github.com/pspdev/psplinkusb.git || { exit 1; }
fi
git submodule update --init --remote || { exit 1; }
cd psplinkusb || { exit 1; }
make -f Makefile.clients install || { exit 1; }
git clean -fdx || { exit 1; }
cd .. || { exit 1; }
echo "DONE!"
echo "PSPDEV=$PSPDEV"