mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-24 13:36:31 +00:00
Allow to execute commands using enter.sh directly (#781)
This is useful e.g. if one just wants to run a build.
This commit is contained in:
parent
4a3837374f
commit
cc4a6ebf96
@ -2,6 +2,8 @@
|
||||
BUILDER_UID="$(id -u)"
|
||||
BUILDER_GID="$(id -g)"
|
||||
CACHE_DIR="${CACHE_DIR:-$HOME/hassos-cache}"
|
||||
ARGS="$*"
|
||||
COMMAND="${ARGS:-bash}"
|
||||
|
||||
sudo mkdir -p "${CACHE_DIR}"
|
||||
sudo chown -R "${BUILDER_UID}:${BUILDER_GID}" "${CACHE_DIR}"
|
||||
@ -9,4 +11,4 @@ sudo docker build -t hassos:local .
|
||||
sudo docker run -it --rm --privileged \
|
||||
-v "$(pwd):/build" -v "${CACHE_DIR}:/cache" \
|
||||
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
|
||||
hassos:local bash
|
||||
hassos:local ${COMMAND}
|
||||
|
Loading…
x
Reference in New Issue
Block a user