mirror of
https://github.com/Retropex/raspiblitz.git
synced 2025-05-12 19:20:48 +02:00
shellcheck disable SC2068 and SC2145
This commit is contained in:
parent
097016c71f
commit
09da5974a4
@ -209,13 +209,15 @@ elif [ "$1" = "set" ] || [ "$1" = "init" ]; then
|
|||||||
elif [ "$1" = "get" ]; then
|
elif [ "$1" = "get" ]; then
|
||||||
|
|
||||||
position=0
|
position=0
|
||||||
for keystr in "$@"
|
# shellcheck disable=SC2068
|
||||||
|
for keystr in $@
|
||||||
do
|
do
|
||||||
|
|
||||||
# skip first parameter
|
# skip first parameter
|
||||||
((position++))
|
((position++))
|
||||||
if [ $position -eq 1 ]; then
|
if [ $position -eq 1 ]; then
|
||||||
echo "# _cache.sh $*"
|
# shellcheck disable=SC2145
|
||||||
|
echo "# _cache.sh $@"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -429,13 +431,15 @@ elif [ "$1" = "valid" ]; then
|
|||||||
|
|
||||||
position=0
|
position=0
|
||||||
lasttouch_overall=""
|
lasttouch_overall=""
|
||||||
for keystr in "$@"
|
# shellcheck disable=SC2068
|
||||||
|
for keystr in $@
|
||||||
do
|
do
|
||||||
|
|
||||||
# skip first parameter from script - thats the action string
|
# skip first parameter from script - thats the action string
|
||||||
((position++))
|
((position++))
|
||||||
if [ $position -eq 1 ]; then
|
if [ $position -eq 1 ]; then
|
||||||
echo "# _cache.sh $*"
|
# shellcheck disable=SC2145
|
||||||
|
echo "# _cache.sh $@"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -278,7 +278,8 @@ function headless() {
|
|||||||
|
|
||||||
# command: cache
|
# command: cache
|
||||||
function cache() {
|
function cache() {
|
||||||
sudo /home/admin/_cache.sh "$@"
|
# shellcheck disable=SC2068
|
||||||
|
sudo /home/admin/_cache.sh $@
|
||||||
}
|
}
|
||||||
|
|
||||||
# command: torthistx
|
# command: torthistx
|
||||||
|
@ -23,7 +23,8 @@ if [ "$1" = "set" ]; then
|
|||||||
|
|
||||||
# check that key & value are given
|
# check that key & value are given
|
||||||
if [ "${keystr}" == "" ] || [ "${valuestr}" == "" ]; then
|
if [ "${keystr}" == "" ] || [ "${valuestr}" == "" ]; then
|
||||||
echo "# blitz.conf.sh $*"
|
# shellcheck disable=SC2145
|
||||||
|
echo "# blitz.conf.sh $@"
|
||||||
echo "# FAIL: missing parameter"
|
echo "# FAIL: missing parameter"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -39,7 +40,8 @@ if [ "$1" = "set" ]; then
|
|||||||
# check that config file exists
|
# check that config file exists
|
||||||
raspiblitzConfExists=$(ls ${configFile} 2>/dev/null | grep -c "${configFile}")
|
raspiblitzConfExists=$(ls ${configFile} 2>/dev/null | grep -c "${configFile}")
|
||||||
if [ ${raspiblitzConfExists} -eq 0 ]; then
|
if [ ${raspiblitzConfExists} -eq 0 ]; then
|
||||||
echo "# blitz.conf.sh $*"
|
# shellcheck disable=SC2145
|
||||||
|
echo "# blitz.conf.sh $@"
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -87,7 +89,8 @@ elif [ "$1" = "list-add" ]; then
|
|||||||
|
|
||||||
# check that key & value are given
|
# check that key & value are given
|
||||||
if [ "${keystr}" == "" ] || [ "${valuestr}" == "" ]; then
|
if [ "${keystr}" == "" ] || [ "${valuestr}" == "" ]; then
|
||||||
echo "# blitz.conf.sh $*"
|
# shellcheck disable=SC2145
|
||||||
|
echo "# blitz.conf.sh $@"
|
||||||
echo "# FAIL: missing parameter"
|
echo "# FAIL: missing parameter"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -141,7 +144,8 @@ elif [ "$1" = "list-remove" ]; then
|
|||||||
|
|
||||||
# check that key & value are given
|
# check that key & value are given
|
||||||
if [ "${keystr}" == "" ] || [ "${valuestr}" == "" ]; then
|
if [ "${keystr}" == "" ] || [ "${valuestr}" == "" ]; then
|
||||||
echo "# blitz.conf.sh $*"
|
# shellcheck disable=SC2145
|
||||||
|
echo "# blitz.conf.sh $@"
|
||||||
echo "# FAIL: missing parameter"
|
echo "# FAIL: missing parameter"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -53,10 +53,12 @@ if [ "${needsExpansion}" == "1" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
apt_install() {
|
apt_install() {
|
||||||
sudo DEBIAN_FRONTEND=noninteractive apt install -y "$*"
|
# shellcheck disable=SC2068
|
||||||
|
sudo DEBIAN_FRONTEND=noninteractive apt install -y ${@}
|
||||||
if [ $? -eq 100 ]; then
|
if [ $? -eq 100 ]; then
|
||||||
echo "FAIL! apt failed to install needed packages!"
|
echo "FAIL! apt failed to install needed packages!"
|
||||||
echo "$*"
|
# shellcheck disable=SC2068
|
||||||
|
echo ${@}
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user