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:29:51 +01:00

42 lines
No EOL
653 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
ORIGIN=`pwd`
cd /docker
./man $@
cd $ORIGIN
else
docker $@
fi
}
if [ "$1" = "-c" ]; then
shift # DO NOT REMOVE, FUCKING DEGENERATE; THIS IS PREVENTING A FORKBOMB!!!!!!!!
router.sh $@
fi
case $1 in
logs|l)
dock logs $2
;;
attach|a)
docker attach --sig-proxy=false $2
;;
shell|''|*)
${PREF_SHELL:-bash} $@
;;
esac