#!/bin/sh
# NOTE: This script uses tabs for indentation
USAGE="Usage: [keyboard[:keymap[:target]]]"
# Check preconditions
for; do
if [; then
fi
done
if [; then
fi
# Allow $RUNTIME to be overriden by the user as an environment variable
# Else check if either docker or podman exit and set them as runtime
# if none are found error out
if [; then
if ; then
RUNTIME="docker"
elif ; then
RUNTIME="podman"
else
fi
fi
# Determine arguments
if [; then
&&
[ && &&
[ && &&
else
IFS=':'
if [; then
fi
fi
if [; then
keyboard=all
fi
if [; then
# IF we are using docker on non Linux and docker-machine isn't working print an error
# ELSE set usb_args
if [ && [ && ; then
else
usb_args="--privileged -v /dev:/dev"
fi
fi
dir= || dir= # Use Windows path if on Windows
if [; then
uid_arg="--user :"
fi
# Run container and build firmware