Files
san/.profile.roku

81 lines
1.2 KiB
Bash

#!/bin/sh
# I have my automake
export ACLOCAL_PATH=/usr/share/aclocal
export ROKU_NFS_ROOT=$HOME/roku/nfs
export ROKU_NFS_IP=192.168.0.64
export EXPORTROOT=${ROKU_NFS_ROOT}
###############################################################################
#
# Logging
#
LOGDIR="${HOME}/roku/logs"
lfile()
{
local Nth="-1"
if [ $# -gt 0 ]; then
Nth="$1"
fi
echo $(ls -tr -1 ${LOGDIR}/minicom.log.* | tail ${Nth} | head -1)
}
lless()
{
less $(lfile "$@")
}
lcat()
{
cat $(lfile "$@")
}
lgrep()
{
lcat | grep -a --color "$@"
}
ltail()
{
if [ $# -gt 0 ]; then
tail -f $(lfile) | grep --line-buffered "$@"
else
tail -f $(lfile)
fi
}
ldevice()
{
minicom "$@" -C $LOGDIR/minicom.log.$(date +%Y-%m-%d--%H-%M-%S)
}
###############################################################################
#
# Downloaded logs.
#
jfile()
{
local NTH_LOG_FILE=1
if [ "$1" != "" ]; then
NTH_LOG_FILE=$1
fi
echo $PWD/$(ls -t1 S0* | head -$NTH_LOG_FILE | tail -1)
}
jcat()
{
cat $(jfile $1)
}
###############################################################################
#
# Other helpers
#
startvnc()
{
x11vnc -safer -nopw -many --usepw --ncache 10
}