moved get_devlist after check_status

This commit is contained in:
Alex
2017-12-20 18:55:59 +01:00
committed by GitHub
parent 4036885185
commit aa34df6f1e
2 changed files with 12 additions and 11 deletions

View File

@@ -3,7 +3,7 @@
# Amazon Alexa Remote Control (PLAIN shell)
# alex(at)loetzimmer.de
#
# 2017-12-19: v0.7d (for updates see http://blog.loetzimmer.de/2017/10/amazon-alexa-hort-auf-die-shell-echo.html)
# 2017-12-20: v0.7de(for updates see http://blog.loetzimmer.de/2017/10/amazon-alexa-hort-auf-die-shell-echo.html)
#
###
#
@@ -585,17 +585,17 @@ if [ ! -f ${COOKIE} ] ; then
log_in
fi
if [ ! -f ${DEVTXT} ] ; then
echo "device list do not exist. downloading ..."
get_devlist
fi
check_status
if [ $? -eq 0 ] ; then
echo "cookie expired, logging in again ..."
log_in
fi
if [ ! -f ${DEVTXT} ] ; then
echo "device list do not exist. downloading ..."
get_devlist
fi
if [ -n "$COMMAND" ] ; then
set_var
if [ -n "$COMMAND" ] ; then