Browse Source

feat: update serverlist menu

The script now skips the first line of the serverlist file when generating the list for 'list' and 'install' commands. This ensures that the header is not included in the output.
pull/4231/head
Daniel Gibbs 2 years ago
parent
commit
13ded550d7
  1. 4
      linuxgsm.sh

4
linuxgsm.sh

@ -347,11 +347,11 @@ if [ "${shortname}" == "core" ]; then
if [ "${userinput}" == "list" ] || [ "${userinput}" == "l" ]; then
{
tail -n +1 "${serverlist}" | awk -F "," '{print $2 "\t" $3}'
tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}'
} | column -s $'\t' -t | more
exit
elif [ "${userinput}" == "install" ] || [ "${userinput}" == "i" ]; then
tail -n +1 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}"
tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}"
fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}"
userinput="${result}"
fn_server_info

Loading…
Cancel
Save