mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Start build refactor with top-level Makefile
- Recursively calls make in monad-linux and monad-build - Eventually will deprecate scripts dir - Makes monad-docker.sh shareable
This commit is contained in:
1 parent
0da23d5b5c
commit
16a2ae2fa8
5 files changed
+51
-12
No files matched your search
@@ -1,42 +0,0 @@
|
||||
# docker run magrathea without tty
|
||||
monad-run()
|
||||
{
|
||||
monad-docker-run "--attach STDOUT --attach STDERR" $*
|
||||
}
|
||||
|
||||
# docker run magrathea with interactive tty
|
||||
monad-tty()
|
||||
{
|
||||
monad-docker-run "--interactive --tty" $*
|
||||
}
|
||||
|
||||
# runs ephemeral andschwa/magrathea docker container with local
|
||||
# directory mounted to /opt and workdir set to /opt/scripts
|
||||
monad-docker-run()
|
||||
{
|
||||
local CONSOLE=$1
|
||||
shift 1
|
||||
docker run --rm \
|
||||
--volume $(dirname $(pwd))/:/opt \
|
||||
--workdir /opt/scripts \
|
||||
$CONSOLE \
|
||||
andschwa/magrathea:latest \
|
||||
bash -c "$(monad-impersonate) bash -c '$*'"
|
||||
}
|
||||
|
||||
# creates new user in container matching the local user so that
|
||||
# artifacts will be owned by the local user; set IMPERSONATE to false
|
||||
# to disable and run as root, defaults to true
|
||||
if [[ ! $IMPERSONATE ]]; then IMPERSONATE=true; fi
|
||||
monad-impersonate()
|
||||
{
|
||||
if ! $IMPERSONATE; then return; fi
|
||||
local CUID=$(id -u)
|
||||
local CUSER=$(id -un)
|
||||
local CGID=$(id -g)
|
||||
local CGROUP=$(id -gn)
|
||||
echo \
|
||||
groupadd -g $CGID $CGROUP '&&' \
|
||||
useradd -u $CUID -g $CGID -d /opt $CUSER '&&' \
|
||||
sudo --set-home -u $CUSER -g $CGROUP --
|
||||
}
|
||||
Binary file not shown.
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="System.Reflection.Metadata" version="1.0.22" />
|
||||
<package id="System.Collections.Immutable" version="1.1.37" />
|
||||
<package id="Microsoft.Net.Compilers" version="1.0.0" />
|
||||
</packages>
|
||||
Reference in new issue
Block a user