Define web server prefix and directory.
This commit is contained in:
@@ -52,6 +52,7 @@ ldevice()
|
|||||||
minicom "$@" -C $LOGDIR/minicom.log.$(date +%Y-%m-%d--%H-%M-%S)
|
minicom "$@" -C $LOGDIR/minicom.log.$(date +%Y-%m-%d--%H-%M-%S)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
# Downloaded logs.
|
# Downloaded logs.
|
||||||
|
|||||||
@@ -1,61 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
_ROKU_SHELL_DIR=$(dirname $(realpath $(readlink -f "${BASH_SOURCE[0]}" )))
|
export ROKU_WEB_DIR="$HOME/roku"
|
||||||
|
export ROKU_WEB_PREFIX="roku"
|
||||||
|
export _ROKU_SHELL_DIR=$(dirname $(realpath $(readlink -f "${BASH_SOURCE[0]}" )))
|
||||||
source $_ROKU_SHELL_DIR/_roku_shared.sh
|
source $_ROKU_SHELL_DIR/_roku_shared.sh
|
||||||
source $_ROKU_SHELL_DIR/_roku_completion.sh
|
source $_ROKU_SHELL_DIR/_roku_completion.sh
|
||||||
|
|
||||||
roku()
|
|
||||||
{
|
|
||||||
_roku_dispatch "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
complete -F __roku_completion roku
|
complete -F __roku_completion roku
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
#
|
|
||||||
# Logging
|
|
||||||
#
|
|
||||||
LOGDIR="${HOME}/roku/logs"
|
|
||||||
|
|
||||||
|
|
||||||
dcapture()
|
|
||||||
{
|
|
||||||
nc minicom "$@" -C $LOGDIR/.log.$(date +%Y-%m-%d--%H-%M-%S)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
dfile()
|
|
||||||
{
|
|
||||||
local Nth="-1"
|
|
||||||
if [ $# -gt 0 ]; then
|
|
||||||
Nth="$1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo $(ls -tr -1 ${LOGDIR}/minicom.log.* | tail ${Nth} | head -1)
|
|
||||||
}
|
|
||||||
|
|
||||||
dless()
|
|
||||||
{
|
|
||||||
less $(lfile "$@")
|
|
||||||
}
|
|
||||||
|
|
||||||
dcat()
|
|
||||||
{
|
|
||||||
cat $(lfile "$@")
|
|
||||||
}
|
|
||||||
|
|
||||||
dgrep()
|
|
||||||
{
|
|
||||||
lcat | grep -a --color "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
dtail()
|
|
||||||
{
|
|
||||||
if [ $# -gt 0 ]; then
|
|
||||||
tail -f $(lfile) | grep "$@"
|
|
||||||
else
|
|
||||||
tail -f $(lfile)
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user