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