roku wget password
This commit is contained in:
@@ -1,197 +1,14 @@
|
||||
#!/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}
|
||||
|
||||
|
||||
export DEVPASSWORD=aaaa
|
||||
_roku_device()
|
||||
{
|
||||
if [ "$1" != "" ]; then
|
||||
export ROKU_DEV_TARGET="$1"
|
||||
export ROKU_DEV_PLATFORM="$(_roku.sh device_platform)"
|
||||
fi
|
||||
echo "device: $ROKU_DEV_TARGET"
|
||||
echo "platform: $ROKU_DEV_PLATFORM"
|
||||
}
|
||||
source _roku_shared.sh
|
||||
|
||||
roku()
|
||||
{
|
||||
if [ "$1" = "device" -a "$2" != "info" ]; then
|
||||
shift
|
||||
_roku_device "$@"
|
||||
else
|
||||
_roku.sh "$@"
|
||||
fi
|
||||
_roku_dispatch "$@"
|
||||
}
|
||||
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Build Completion
|
||||
#
|
||||
__roku_completion_contains()
|
||||
{
|
||||
# Platforms
|
||||
for WORD in "$@"; do
|
||||
if [[ "${COMP_WORDS[*]}" =~ "$WORD" ]]; then
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
__roku_completion_add_if()
|
||||
{
|
||||
__roku_completion_contains "$@"
|
||||
if [[ $? == 0 ]]; then
|
||||
CANDIDATES+=" $@"
|
||||
fi
|
||||
}
|
||||
|
||||
# complete -F __build_completion roku
|
||||
# __build_completion()
|
||||
# {
|
||||
# local CANDIDATES="help clobber tests addon-checksums"
|
||||
|
||||
# # Docker
|
||||
# __build_completion_add_if docker make
|
||||
|
||||
# # Build hosts
|
||||
# __build_completion_add_if icecc local
|
||||
|
||||
# # Port dir
|
||||
# __build_completion_add_if port-only
|
||||
|
||||
# # Platforms
|
||||
# __build_completion_add_if native marlin bailey loggan lockhart porting-kit streambar stb
|
||||
|
||||
# COMPREPLY=($(compgen -W "$CANDIDATES" "${COMP_WORDS[${COMP_CWORD}]}"))
|
||||
# }
|
||||
|
||||
complete -F __roku_completion roku
|
||||
__roku_completion()
|
||||
{
|
||||
local CANDIDATES="device get log flash telnet reboot audcap san_update sideload token_install"
|
||||
|
||||
# # Docker
|
||||
# __build_completion_add_if docker make
|
||||
|
||||
# # Build hosts
|
||||
# __build_completion_add_if icecc local
|
||||
|
||||
# # Port dir
|
||||
# __build_completion_add_if port-only
|
||||
|
||||
# # Platforms
|
||||
# __build_completion_add_if native marlin bailey loggan lockhart porting-kit streambar stb
|
||||
|
||||
COMPREPLY=($(compgen -W "$CANDIDATES" "${COMP_WORDS[${COMP_CWORD}]}"))
|
||||
}
|
||||
|
||||
|
||||
################################################################################
|
||||
##
|
||||
## Set active roku device
|
||||
##
|
||||
|
||||
#rokutelnet()
|
||||
#{
|
||||
# [ -z "$ROKU_DEV_TARGET" ] && echo "ROKU_DEV_TARGET must be defined" && return 0
|
||||
# telnet "$ROKU_DEV_TARGET" $1
|
||||
#}
|
||||
|
||||
################################################################################
|
||||
##
|
||||
## Run commands on active device
|
||||
##
|
||||
#__netcat()
|
||||
#{
|
||||
# if [ "$1" != "" ]; then
|
||||
# netcat -t $ROKU_DEV_TARGET $1
|
||||
# else
|
||||
# netcat -t $ROKU_DEV_TARGET 23
|
||||
# fi
|
||||
#}
|
||||
|
||||
#__set_server_ip()
|
||||
#{
|
||||
# SERVER_IP=$(ip route get "${ROKU_DEV_TARGET}" | sed -n "s/.* src \([\.0-9]*\) .*/\1/p")
|
||||
#}
|
||||
|
||||
#device_cmd()
|
||||
#{
|
||||
# echo "$1; exit" | __netcat
|
||||
#}
|
||||
|
||||
#rokuflash()
|
||||
#{
|
||||
# [ -z "$ROKU_DEV_TARGET" ] && echo "ROKU_DEV_TARGET must be defined" && return 0
|
||||
# __set_server_ip
|
||||
# device_cmd ". /nvram/san; export SERVER_IP=$SERVER_IP; rokuflash $1"
|
||||
#}
|
||||
|
||||
#rokulog()
|
||||
#{
|
||||
# [ -z "$ROKU_DEV_TARGET" ] && echo "ROKU_DEV_TARGET must be defined" && return 0
|
||||
# device_cmd "setconsole /dev/pts/0"
|
||||
#}
|
||||
|
||||
#rokureboot()
|
||||
#{
|
||||
# [ -z "$ROKU_DEV_TARGET" ] && echo "ROKU_DEV_TARGET must be defined" && return 0
|
||||
# device_cmd "reboot"
|
||||
#}
|
||||
|
||||
#update_san()
|
||||
#{
|
||||
# [ -z "$ROKU_DEV_TARGET" ] && echo "ROKU_DEV_TARGET must be defined" && return 0
|
||||
#}
|
||||
|
||||
################################################################################
|
||||
##
|
||||
## Retrieve audio.
|
||||
##
|
||||
#app_cmd()
|
||||
#{
|
||||
#echo "$1
|
||||
#exit" | __netcat 8080
|
||||
#}
|
||||
|
||||
#rokuaudcap()
|
||||
#{
|
||||
# [ -z "$ROKU_DEV_TARGET" ] && echo "ROKU_DEV_TARGET must be defined" && return 0
|
||||
# __set_server_ip
|
||||
# app_cmd "audcap record start 00"
|
||||
# echo -n "Press Enter to stop capture."
|
||||
# read
|
||||
# app_cmd "audcap record stop"
|
||||
# device_cmd "tftp -p -r $1.pcm -l /tmp/audcap_audio.pcm $SERVER_IP"
|
||||
# sox -t raw -r 48000 -b 16 -c 2 -e signed-integer $1.pcm $1.wav
|
||||
#}
|
||||
|
||||
################################################################################
|
||||
##
|
||||
## Work with channels.
|
||||
##
|
||||
|
||||
#install_auth_token()
|
||||
#{
|
||||
# [ ! -f "$1" ] && echo "usage: install_auth_toke <auth token file> \n ROKU_DEV_TARGET=${ROKU_DEV_TARGET}" && return 0
|
||||
# [ -z "$ROKU_DEV_TARGET" ] && echo "ROKU_DEV_TARGET must be defined" && return 0
|
||||
# curl --data-binary @$1 http://${ROKU_DEV_TARGET}:8060/token/install
|
||||
#}
|
||||
|
||||
#sideload()
|
||||
#{
|
||||
# [ ! -f "$1" ] && echo "usage: sideload <file> \n ${ROKU_DEV_TARGET}=${ROKU_DEV_TARGET}" && return 0
|
||||
# [ -z "$ROKU_DEV_TARGET" ] && echo "ROKU_DEV_TARGET must be defined" && return 0
|
||||
# curl --anyauth --user "rokudev:${DEVPASSWORD}" -F "mysubmit=Install_Netflix" -F "archive=@$1" http://${ROKU_DEV_TARGET}/plugin_install
|
||||
#}
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@@ -240,19 +57,3 @@ dtail()
|
||||
fi
|
||||
}
|
||||
|
||||
################################################################################
|
||||
##
|
||||
## Misc
|
||||
##
|
||||
|
||||
#rokuget()
|
||||
#{
|
||||
# [ -z "$1" ] && echo "usage: rokuget <url>" && return 0
|
||||
# if [ -z "$ROKU_CORP_PASSWORD" ]; then
|
||||
# local USER_PASSWORD="--ask-password"
|
||||
# else
|
||||
# local USER_PASSWORD="--password=$ROKU_CORP_PASSWORD"
|
||||
# fi
|
||||
# wget --no-check-certificate --user=vkhachatryan $USER_PASSWORD $1
|
||||
#}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user