From 9a85a6d12d592c8124c811bcdcd06ac69de54a9a Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Wed, 9 May 2018 19:29:50 -0400 Subject: [PATCH] Working game menu! --- game-menu.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/game-menu.sh b/game-menu.sh index d3e788f..06ef8b1 100755 --- a/game-menu.sh +++ b/game-menu.sh @@ -8,7 +8,7 @@ path="${path%/*}" declare -A gameList for i in $path/*/ ; do i="${i::-1}" -gameList[${i##*/}]="$i" +gameList[${i##*/}]="${i}" done gameList[exit]="Exit" while : ; do @@ -19,7 +19,8 @@ echo "$i" echo '|' done) --stdout)" if [[ "$game" != "exit" && -n "$game" ]]; then -eval "${gameList[$game]}" +cd "${gameList[$game]}" +./$game"" else break fi