-
-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add quickreport; gather information for bug reports. close #1163
- Loading branch information
1 parent
65f065a
commit 3270181
Showing
3 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
chunkcheck usr/bin | ||
quickemu usr/bin | ||
quickget usr/bin | ||
quickreport usr/bin | ||
This comment has been minimized.
Sorry, something went wrong. |
||
windowskey usr/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/usr/bin/env bash | ||
|
||
quick_report() { | ||
local GPUS | ||
local PRETTY_NAME | ||
local VERSION | ||
if [ -e /etc/os-release ]; then | ||
PRETTY_NAME="$(grep PRETTY_NAME /etc/os-release | cut -d'"' -f2)" | ||
else | ||
PRETTY_NAME="Unknown OS" | ||
fi | ||
|
||
if command -v quickemu &> /dev/null; then | ||
VERSION=$(quickemu --version) | ||
echo \ | ||
"---------------------------------- | ||
Quickemu ${VERSION} | ||
----------------------------------" | ||
echo -e "Distro:\t${PRETTY_NAME}" | ||
echo -e "Kernel:\t$(uname -s -r -m)" | ||
echo -e "Memory:\t$(free --si -h | awk '/Mem:/{print $2}')" | ||
# Break IFS on new line | ||
IFS=$'\n' | ||
GPUS=$(lspci | grep -i vga | cut -d':' -f3) | ||
This comment has been minimized.
Sorry, something went wrong.
philclifford
Contributor
|
||
|
||
if [ "$(echo "${GPUS}" | wc -l)" -eq 1 ]; then | ||
echo "GPU:" | ||
else | ||
echo "GPUs:" | ||
fi | ||
for GPU in ${GPUS}; do | ||
echo " -${GPU}" | ||
done | ||
else | ||
echo \ | ||
"---------------------------------- | ||
Quickemu missing! | ||
----------------------------------" | ||
exit 1 | ||
fi | ||
|
||
if command -v curl &> /dev/null; then | ||
VERSION=$(curl --version) | ||
echo \ | ||
"---------------------------------- | ||
curl $(echo "${VERSION}" | head -1 | cut -d' ' -f2) | ||
----------------------------------" | ||
echo -e "Libraries:$(echo "${VERSION}" | head -1 | cut -d')' -f2-)" | ||
echo -e "Protocols:$(echo "${VERSION}" | tail +3 | head -1 | cut -d':' -f2-)" | ||
echo -e "Features: $(echo "${VERSION}" | tail +4 | head -1 | cut -d':' -f2-)" | ||
else | ||
echo \ | ||
"---------------------------------- | ||
curl missing | ||
----------------------------------" | ||
fi | ||
|
||
if command -v qemu-system-"$(uname -m)" &> /dev/null; then | ||
VERSION=$(qemu-system-"$(uname -m)" -version | head -1 | cut -d' ' -f4) | ||
echo \ | ||
"---------------------------------- | ||
QEMU ${VERSION} | ||
----------------------------------" | ||
qemu-system-"$(uname -m)" -cpu help | ||
else | ||
echo \ | ||
"---------------------------------- | ||
QEMU missing | ||
----------------------------------" | ||
fi | ||
|
||
echo \ | ||
"---------------------------------- | ||
CPU | ||
----------------------------------" | ||
lscpu | ||
} | ||
|
||
clear | ||
quick_report | tee quickreport.txt |
Needs adding to Makefile too