Define web server prefix and directory.

This commit is contained in:
2023-06-23 18:27:47 +01:00
parent e69f8ee82c
commit 4820605201
2 changed files with 4 additions and 55 deletions

View File

@@ -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.

View File

@@ -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
}