mirror of
https://github.com/wesnoth/wesnoth
synced 2024-09-20 16:00:09 +00:00
b6d7d7ea18
@Pentarctagon noticed in commit 9a34cbb329
that $UID isn't set when
/bin/sh isn't GNU Bash. `id -u` is specified by POSIX:
https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/id.html
Also move `-xe` to a `set` command (in case someone runs scripts with
`sh path/to/script` instead of `path/to/script`) and add `set -u` to
complain more loudly about such unset variables.
13 lines
354 B
Bash
Executable File
13 lines
354 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -xeu
|
|
|
|
cd steamrt
|
|
docker build -t steamos-wesnoth .
|
|
rm -rf ../steambuild
|
|
mkdir ../steambuild
|
|
if [ -d "$PWD"/../../../build ]; then
|
|
echo "Existing scons 'build' directory found, this may cause the build to fail!"
|
|
fi
|
|
docker run -v "$PWD"/../../..:/wesnoth -v "$PWD"/../steambuild:/output --tmpfs /build:exec -u "$(id -u)" steamos-wesnoth
|