fix(quickreport): discover quickemu if not in the PATH. close #1235

This commit is contained in:
Martin Wimpress 2024-05-22 08:39:26 -04:00 committed by Martin Wimpress
parent 1fea6b46c2
commit 9fe835d107
1 changed files with 10 additions and 2 deletions

View File

@ -3,6 +3,7 @@
quick_report() { quick_report() {
local GPUS local GPUS
local PRETTY_NAME local PRETTY_NAME
local QUICKEMU
local VERSION local VERSION
if [ -e /etc/os-release ]; then if [ -e /etc/os-release ]; then
PRETTY_NAME="$(grep PRETTY_NAME /etc/os-release | cut -d'"' -f2)" PRETTY_NAME="$(grep PRETTY_NAME /etc/os-release | cut -d'"' -f2)"
@ -10,8 +11,15 @@ quick_report() {
PRETTY_NAME="Unknown OS" PRETTY_NAME="Unknown OS"
fi fi
if command -v quickemu &> /dev/null; then CWD="$(dirname "${0}")"
VERSION=$(quickemu --version) if [ -x "${CWD}/quickemu" ]; then
QUICKEMU="${CWD}/quickemu"
elif [ -x "$(command -v quickemu)" ]; then
QUICKEMU="$(command -v quickemu)"
fi
if [ -n "${QUICKEMU}" ]; then
VERSION=$(${QUICKEMU} --version)
echo \ echo \
"---------------------------------- "----------------------------------
Quickemu ${VERSION} Quickemu ${VERSION}