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

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