44 lines
1.3 KiB
Bash
Executable File
44 lines
1.3 KiB
Bash
Executable File
#!/bin/ksh
|
|
|
|
# games.ksh
|
|
# This script facilitates remote game play on SDF
|
|
# Copyright (C) 2022 Scott C. MacCallum
|
|
# scm@sdf.org
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
host=sdf.org
|
|
user=scm
|
|
|
|
echo "I will get the games list."
|
|
echo "When it is displayed, use the up and down arrow keys to navigate it."
|
|
echo "Press the Q key to close it."
|
|
echo -n "Press the Return/Enter key now until the list displays: "
|
|
read key
|
|
|
|
mosh $user@$host games > games.txt
|
|
|
|
# To do: write some logic that checks if games.txt exists, if it does, ask
|
|
# the user if they are OK with it be overwritten.
|
|
|
|
mosh $user@$host less games.txt
|
|
|
|
echo -n "Type the name of the game that you want to play: "
|
|
read game
|
|
|
|
mosh $user@$host $game
|
|
|
|
exit 0
|