Working game menu!
This commit is contained in:
parent
a9be38ea09
commit
9a85a6d12d
@ -8,7 +8,7 @@ path="${path%/*}"
|
|||||||
declare -A gameList
|
declare -A gameList
|
||||||
for i in $path/*/ ; do
|
for i in $path/*/ ; do
|
||||||
i="${i::-1}"
|
i="${i::-1}"
|
||||||
gameList[${i##*/}]="$i"
|
gameList[${i##*/}]="${i}"
|
||||||
done
|
done
|
||||||
gameList[exit]="Exit"
|
gameList[exit]="Exit"
|
||||||
while : ; do
|
while : ; do
|
||||||
@ -19,7 +19,8 @@ echo "$i"
|
|||||||
echo '|'
|
echo '|'
|
||||||
done) --stdout)"
|
done) --stdout)"
|
||||||
if [[ "$game" != "exit" && -n "$game" ]]; then
|
if [[ "$game" != "exit" && -n "$game" ]]; then
|
||||||
eval "${gameList[$game]}"
|
cd "${gameList[$game]}"
|
||||||
|
./$game""
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user