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

36 lines
No EOL
498 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
}
case $1 in
logs|l)
dock logs $2
;;
attach|a)
docker attach --sig-proxy=false $2
;;
shell|''|*)
${PREF_SHELL:-bash} $@
;;
esac