This repository has been archived on 2023-05-02. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
neo/tools/router.sh
2022-12-13 14:09:02 +01:00

41 lines
No EOL
554 B
Bash
Executable file

#!/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
}
if [ "$1" = "-c" ]; then
shift
router.sh $@
fi
case $1 in
logs|l)
dock logs $2
;;
attach|a)
docker attach --sig-proxy=false $2
;;
shell|''|*)
${PREF_SHELL:-bash} $@
;;
esac