From 5b9d5056e8afc83f74408f696aebe6d138db147e Mon Sep 17 00:00:00 2001 From: the-sane <3657071+the-sane@users.noreply.github.com> Date: Tue, 4 Aug 2020 18:07:50 -0400 Subject: [PATCH] Use sh-supported argument shift for portability --- lug-helper.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lug-helper.sh b/lug-helper.sh index 72c85fd..a164e8a 100644 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh ############################################################################ # Star Citizen's Linux Users Group Helper Script @@ -65,10 +65,12 @@ message() { # Display the message if [ "$1" -eq 4 ] || [ "$1" -eq 5 ]; then # requires a space between the assembled arguments - zenity "${margs[@]}" "${@:2}" --width="400" --title="Star Citizen LUG Helper Script" + shift 1 # drop the first numerical argument and shift the remaining up one + zenity "${margs[@]}" "$@" --width="400" --title="Star Citizen LUG Helper Script" else # no space between the assmebled arguments - zenity "${margs[@]}""${@:2}" --width="400" --title="Star Citizen LUG Helper Script" + shift 1 # drop the first numerical argument and shift the remaining up one + zenity "${margs[@]}""$@" --width="400" --title="Star Citizen LUG Helper Script" fi else # Text based menu. Does not work with message types 4 and 5 (zenity radio lists)