ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/make-build-env.sh
Revision: 1166
Committed: Tue Oct 26 14:22:36 2021 UTC (3 years, 11 months ago) by rossy
Content type: text/x-sh
File size: 693 byte(s)
Log Message:
Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File Contents

# Content
1 #!/usr/bin/env bash
2 set -e
3
4 # This script creates a very minimal MSYS2 build environment that can be
5 # distributed with the Daodan source code, allowing 1-click builds with
6 # mingw-build.bat. It must be ran from an existing MSYS2 environment.
7
8 if [[ $(uname -o) != 'Msys' ]]; then
9 printf >&2 'This script must be ran from an MSYS2 environment\n'
10 exit 1
11 fi
12
13 cd "$(dirname -- "$0")"
14 root="$PWD/MSYS2"
15
16 rm -rf -- "$root"
17 mkdir -p -- "$root/var/lib/pacman"
18 pacman --noconfirm --root="$root" -Sy --needed bash
19 pacman --noconfirm --root="$root" -S --needed coreutils
20 pacman --noconfirm --root="$root" -S --needed make mingw-w64-i686-gcc
21 touch -- "$root/tmp/.keep"
22 rm -rf -- "$root/var/lib/pacman"