mirror of
https://github.com/wesnoth/wesnoth
synced 2024-09-20 07:51:33 +00:00
Replace Bash $UID with portable $(id -u) in Docker scripts
@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.
This commit is contained in:
parent
fcb3ce33b7
commit
b6d7d7ea18
|
@ -1,7 +1,9 @@
|
|||
#!/bin/sh -xe
|
||||
#!/bin/sh
|
||||
|
||||
set -xeu
|
||||
|
||||
cd mingw
|
||||
docker build -t mingw-wesnoth .
|
||||
rm -rf ../mingwbuild
|
||||
mkdir ../mingwbuild
|
||||
docker run -v "$PWD"/../../..:/wesnoth -v "$PWD"/../mingwbuild:/output --tmpfs /build -u "$UID" mingw-wesnoth
|
||||
docker run -v "$PWD"/../../..:/wesnoth -v "$PWD"/../mingwbuild:/output --tmpfs /build -u "$(id -u)" mingw-wesnoth
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/bin/sh -xe
|
||||
#!/bin/sh
|
||||
|
||||
set -xeu
|
||||
|
||||
cd steamrt
|
||||
docker build -t steamos-wesnoth .
|
||||
|
@ -7,4 +9,4 @@ 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 "$UID" steamos-wesnoth
|
||||
docker run -v "$PWD"/../../..:/wesnoth -v "$PWD"/../steambuild:/output --tmpfs /build:exec -u "$(id -u)" steamos-wesnoth
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/bin/sh -xe
|
||||
#!/bin/sh
|
||||
|
||||
set -xeu
|
||||
|
||||
VALVEFILE=com.valvesoftware.SteamRuntime.Sdk-amd64,i386-sniper-sysroot.Dockerfile
|
||||
VALVETAR=com.valvesoftware.SteamRuntime.Sdk-amd64,i386-sniper-sysroot.tar.gz
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/bin/sh -xe
|
||||
#!/bin/sh
|
||||
|
||||
set -xeu
|
||||
|
||||
# Run this script from directory containing windows installer(s)
|
||||
# passing needed version as argument
|
||||
|
|
Loading…
Reference in New Issue
Block a user