From 4b1878d88690df379c01a81c0a0cdad0e8925acc Mon Sep 17 00:00:00 2001 From: mrrfv Date: Fri, 19 May 2023 16:40:58 +0200 Subject: [PATCH] remove usage checking for functions --- backup.sh | 2 +- functions/helper.sh | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/backup.sh b/backup.sh index bc52f27..d9261df 100755 --- a/backup.sh +++ b/backup.sh @@ -4,7 +4,7 @@ set -e # Application metadata - don't change # This is used to download a stable, compatible version of the Android companion app as well as ensure backwards compatibility, # so it should match the tag name in GitHub Releases. -APP_VERSION="v1.0.7" +APP_VERSION="v1.0.8" # We use whiptail for showing dialogs. # Whiptail is used similarly as dialog, but we can't install it on macOS using Homebrew IIRC. diff --git a/functions/helper.sh b/functions/helper.sh index 901a592..f835951 100644 --- a/functions/helper.sh +++ b/functions/helper.sh @@ -81,12 +81,6 @@ function install_companion_app() { # The selected option is stored in the result variable # If no option is selected or an error occurs, the function exits with an error message function select_option_from_list() { - # Check if the number of arguments is 3 - if [[ $# -ne 3 ]]; then - echo "Usage: select_option_from_list prompt options[@] result_var" - exit 1 - fi - # Assign the arguments to local variables local prompt="$1" local options=("${!2}") # Use indirect expansion to get the array from the second argument @@ -122,11 +116,6 @@ function select_option_from_list() { function get_text_input() { - if [[ $# -ne 2 ]]; then - echo "Invalid usage. Usage: get_text_input prompt result_var [default_text]" - exit 1 - fi - local prompt="$1" local result_var="$2" local default_text="$3"