mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Refactor build.sh
- build.sh runs non-interactively - build-tty.sh runs interactively with a pseudo tty - both are shims to build-run.sh - monad-native no longer depends on a tty
This commit is contained in:
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# --rm: always run ephemerally
|
||||
# --volume: path must be absolute, so resolve it
|
||||
# --workdir: start location for Make
|
||||
# $DOCKERFLAGS: additional flags
|
||||
# magrathea: contains all dependencies
|
||||
# bash: use $* over $@ so that multi-word parameters aren't split up
|
||||
docker run --rm \
|
||||
--volume $(dirname $(pwd))/:/opt/monad-linux \
|
||||
--workdir /opt/monad-linux/scripts \
|
||||
$DOCKERFLAGS \
|
||||
andschwa/magrathea:latest \
|
||||
bash -c "$*"
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Runs with a pseudo tty so that interactive shells can be opened
|
||||
DOCKERFLAGS="--interactive --tty" ./build-run.sh "$*"
|
||||
+3
-7
@@ -1,9 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Docker requires the volume path to be absolute... so we resolve it ourselves.
|
||||
docker run --rm --interactive --tty \
|
||||
--volume $(dirname $(pwd))/:/opt/monad \
|
||||
--workdir /opt/monad/scripts \
|
||||
andschwa/magrathea:latest \
|
||||
bash -c "/opt/fakelogin; $*"
|
||||
# we use $* over $@ so that multi-word parameters aren't split up
|
||||
echo "$*"
|
||||
# Runs by non-interactively, just attaches output
|
||||
DOCKERFLAGS="--attach STDOUT --attach STDERR" ./build-run.sh "$*"
|
||||
|
||||
+1
-1
Submodule src/monad-native updated: 5693da6a46...1366e3bc8f
Reference in New Issue
Block a user