reformat, add router shell intercept, and other tooling

This commit is contained in:
Didier Slof 2022-12-13 13:39:51 +01:00
parent 244a7d471d
commit 6591b66247
Signed by: didier
GPG key ID: 01E71F18AA4398E5
6 changed files with 57 additions and 1 deletions

36
tools/router.sh Executable file
View file

@ -0,0 +1,36 @@
#!/bin/sh
[ -f ~/.neorc ] && . ~/.neorc
ync() {
case $1 in
yes|y|YES|Y|1)
return 0
;;
no|n|NO|N|0|*)
return 1
;;
esac
}
dock() {
if ync $USE_DOCK_MAN; then
pushd /docker
./man $@
popd
else
docker $@
fi
}
case $1 in
logs|l)
dock logs $2
;;
attach|a)
docker attach --sig-proxy=false $2
;;
shell|''|*)
${PREF_SHELL:-bash} $@
;;
esac