mirror of
https://github.com/meshtastic/python.git
synced 2026-06-02 12:45:00 -04:00
Just a quick set of files to enable the build of (tagged) containers. Both alpine and debian containers are available (~200MiB/~1.2GiB) allowing us to use meshtastic cli with a quick docker run, instead of having to build/install stuff locally. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
25 lines
591 B
Bash
Executable File
25 lines
591 B
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
#
|
|
# Copyright (C) 2025 Olliver Schinagl <oliver@schinagl.nl>
|
|
#
|
|
# A beginning user should be able to docker run image bash (or sh) without
|
|
# needing to learn about --entrypoint
|
|
# https://github.com/docker-library/official-images#consistency
|
|
|
|
set -eu
|
|
|
|
bin='meshtastic'
|
|
|
|
# run command if it is not starting with a "-" and is an executable in PATH
|
|
if [ "${#}" -le 0 ] || \
|
|
[ "${1#-}" != "${1}" ] || \
|
|
[ -d "${1}" ] || \
|
|
! command -v "${1}" > '/dev/null' 2>&1; then
|
|
entrypoint='true'
|
|
fi
|
|
|
|
exec ${entrypoint:+${bin:?}} "${@}"
|
|
|
|
exit 0
|