mirror of
https://github.com/the-sane/lug-helper.git
synced 2024-12-27 08:04:19 +00:00
Use sh-supported argument shift for portability
This commit is contained in:
parent
617313ff05
commit
5b9d5056e8
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
# Star Citizen's Linux Users Group Helper Script
|
# Star Citizen's Linux Users Group Helper Script
|
||||||
@ -65,10 +65,12 @@ message() {
|
|||||||
# Display the message
|
# Display the message
|
||||||
if [ "$1" -eq 4 ] || [ "$1" -eq 5 ]; then
|
if [ "$1" -eq 4 ] || [ "$1" -eq 5 ]; then
|
||||||
# requires a space between the assembled arguments
|
# 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
|
else
|
||||||
# no space between the assmebled arguments
|
# 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
|
fi
|
||||||
else
|
else
|
||||||
# Text based menu. Does not work with message types 4 and 5 (zenity radio lists)
|
# Text based menu. Does not work with message types 4 and 5 (zenity radio lists)
|
||||||
|
Loading…
Reference in New Issue
Block a user