1
0
Fork 0
This commit is contained in:
Arthur K. 2025-06-16 11:04:16 +03:00
parent ce19d6a62c
commit 624ab42f73
Signed by: wzray
GPG key ID: B97F30FDC4636357
26 changed files with 493 additions and 163 deletions

16
.local/bin/scripts/docker Executable file
View file

@ -0,0 +1,16 @@
#!/bin/bash
declare -A CONTEXTS=(
["cpu"]=hicpu
["gpu"]=higpu
)
WORKDIR="$(pwd)"
[[ "$WORKDIR" = "$HOME/Services"* ]] && {
_ctx="$(cut -d'/' -f1 <<<"${WORKDIR#"${HOME}/Services/"}")"
[ -n "$_ctx" ] && _ctx="${CONTEXTS["$_ctx"]}" && \
[ -n "$_ctx" ] && ctx="--context=$_ctx"
}
# shellcheck disable=SC2086
/usr/bin/docker $ctx "$@"