source: Daodan/make-build-env.sh

Last change on this file was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 693 bytes
Line 
1#!/usr/bin/env bash
2set -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
8if [[ $(uname -o) != 'Msys' ]]; then
9 printf >&2 'This script must be ran from an MSYS2 environment\n'
10 exit 1
11fi
12
13cd "$(dirname -- "$0")"
14root="$PWD/MSYS2"
15
16rm -rf -- "$root"
17mkdir -p -- "$root/var/lib/pacman"
18pacman --noconfirm --root="$root" -Sy --needed bash
19pacman --noconfirm --root="$root" -S --needed coreutils
20pacman --noconfirm --root="$root" -S --needed make mingw-w64-i686-gcc
21touch -- "$root/tmp/.keep"
22rm -rf -- "$root/var/lib/pacman"
Note: See TracBrowser for help on using the repository browser.