Fix unbound variable errors

This commit is contained in:
2022-06-01 14:52:44 +02:00
parent 4554625f5f
commit d2071090bc
3 changed files with 6 additions and 6 deletions

View File

@@ -60,7 +60,7 @@ step_10() {
local dnsUrl="46.182.19.48" #digitalcourage.de/support/zensurfreier-dns-server local dnsUrl="46.182.19.48" #digitalcourage.de/support/zensurfreier-dns-server
local dnsFallbackUrl="194.150.168.168" #dns.as250.net; Berlin/Frankfurt local dnsFallbackUrl="194.150.168.168" #dns.as250.net; Berlin/Frankfurt
local lecho="info" local lecho="info"
if [ "$1" == "-l" ]; then if [ "${1:-}" == "-l" ]; then
lecho="echo" lecho="echo"
shift shift
fi fi

View File

@@ -178,8 +178,8 @@ step_7() {
step_20_info() { step_20_info() {
shift shift
local ebuTarget=$EBU_TARGET local ebuTarget="${EBU_TARGET:-}"
[ ! -z "$1" ] && ebuTarget="$1" [ ! -z "${1:-}" ] && ebuTarget="$1"
if contextHelp; then if contextHelp; then
echo "Status of (profile) [TARGET]" echo "Status of (profile) [TARGET]"
elif [ ! -z "$1" ]; then elif [ ! -z "$1" ]; then

View File

@@ -24,7 +24,7 @@ step_18_alias() { echo "updatecheck"; }
step_18() { step_18() {
shift shift
local latestVersion= local latestVersion=
if [ ! -z $1 ] ; then if [ ! -z "${1:-}" ] ; then
latestVersion="$1" latestVersion="$1"
else else
latestVersion=$(curl --silent "$latestUrl" | grep -Po '"tag_name": "v\K.*?(?=")') latestVersion=$(curl --silent "$latestUrl" | grep -Po '"tag_name": "v\K.*?(?=")')
@@ -74,7 +74,7 @@ step_20() {
step_22_info() { step_22_info() {
shift shift
if [ -z $1 ] ; then if [ -z "${1:-}" ] ; then
echo -n "Get latest version from github" echo -n "Get latest version from github"
if ! contextHelp ; then if ! contextHelp ; then
echo ": $(curl --silent "$latestUrl" | grep -Po '"tag_name": "\K.*?(?=")')" echo ": $(curl --silent "$latestUrl" | grep -Po '"tag_name": "\K.*?(?=")')"
@@ -89,7 +89,7 @@ step_22_alias() { echo "upgrade"; }
step_22() { step_22() {
shift # don't need step number shift # don't need step number
local latestVersion= local latestVersion=
if [ ! -z $1 ] ; then if [ ! -z "${1:-}" ] ; then
latestVersion="$1" latestVersion="$1"
else else
latestVersion=$(curl --silent "$latestUrl" | grep -Po '"tag_name": "v\K.*?(?=")') latestVersion=$(curl --silent "$latestUrl" | grep -Po '"tag_name": "v\K.*?(?=")')