-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild_docker.sh
More file actions
executable file
·42 lines (33 loc) · 818 Bytes
/
build_docker.sh
File metadata and controls
executable file
·42 lines (33 loc) · 818 Bytes
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
#!/usr/bin/env bash
# Simple helper script to build through Docker to avoid installing devkitpro toolchain
set -euo pipefail
# help print function
print_help () {
echo "You need to specify the command to run: wii, gamecube or clean"
exit 1
}
# Check only argument is provided
if [ $# -ne 1 ]
then
print_help
fi
# Base docker command
COMMON_DOCKER_ARGS=(-v "$PWD":/project -w /project -u "$(id -u "${USER}")":"$(id -g "${USER}")" devkitpro/devkitppc make)
# Choose operation
case $1 in
wii)
docker run -e "TARGET_CONSOLE=wii" "${COMMON_DOCKER_ARGS[@]}"
;;
gamecube)
docker run -e "TARGET_CONSOLE=gamecube" "${COMMON_DOCKER_ARGS[@]}"
;;
clean)
rm -rf build_wii
rm -rf build_gamecube
rm -rf -- *.elf
rm -rf -- *.dol
;;
*)
print_help
;;
esac