Fix unbound variable errors
This commit is contained in:
@@ -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.*?(?=")')
|
||||
|
Reference in New Issue
Block a user