added the basic support for macOS to the 'system_report' script

This commit is contained in:
filux 2017-08-27 22:29:16 +02:00
parent 4a5249fe54
commit 5a6c59f252
2 changed files with 181 additions and 213 deletions

View File

@ -7,7 +7,7 @@ matrix:
include: include:
- os: linux - os: linux
compiler: gcc compiler: gcc
env: Tr_Compiler_Version="6" env: Tr_Compiler_Version="7"
# https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
dist: trusty # broken compiler on 12.04 dist: trusty # broken compiler on 12.04
- os: linux - os: linux
@ -16,7 +16,7 @@ matrix:
dist: trusty dist: trusty
- os: linux - os: linux
compiler: clang compiler: clang
env: Tr_Compiler_Version="3.9" env: Tr_Compiler_Version="5.0"
# http://apt.llvm.org/, compiler not newer than available on debian testing # http://apt.llvm.org/, compiler not newer than available on debian testing
# https://packages.debian.org/search?suite=testing&keywords=clang- # https://packages.debian.org/search?suite=testing&keywords=clang-
dist: trusty dist: trusty

View File

@ -8,7 +8,7 @@
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# #
# Written by Tom Reynolds <tomreyn[at]megaglest.org> # Written by Tom Reynolds <tomreyn[at]megaglest.org>
# Copyright (c) 2012-2016 Tom Reynolds, The MegaGlest Team, under GNU GPL v3.0 # Copyright (c) 2012-2017 Tom Reynolds, The MegaGlest Team, under GNU GPL v3.0
# #
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# #
@ -29,137 +29,113 @@
# #
LANG=C LANG=C
VERSION='0.3.4' VERSION='0.3.5'
MYNAME=`basename $0` MYNAME="$(basename "$0")"
DEFAULT_REPORT_FILENAME=system_report.log DEFAULT_REPORT_FILENAME="system_report.log"
KERNEL="$(uname -s | tr '[A-Z]' '[a-z]')"
if [ "$KERNEL" = "darwin" ]; then Exec_1="MegaGlest.sh"; Exec_2="MegaGlest"
Default_location="/Applications/MegaGlest.app/Contents/MacOS"
else Exec_1="start_megaglest"; Exec_2="megaglest"
Default_location=~/"megaglest"
fi
if [ "$KERNEL" = "linux" ] || [ "$(echo "$(readlink -f "$0" >/dev/null 2>&1; echo $?)" | grep '^[0-9]$')" -eq "0" ]; then
SCRIPTDIR="$(dirname "$(readlink -f "$0")")"
else
SCRIPTDIR="$(cd "$(dirname "$0")"; pwd)"
fi
if [ "$1" = "-v" ] || [ "$1" = "--version" ]; then
echo "MegaGlest System Report $VERSION"; echo; exit 0; fi
if [ "$1"'x' = '-vx' -o "$1"'x' = '--versionx' ] if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
then echo "Usage:"
echo 'MegaGlest System Report '"$VERSION" echo " $MYNAME <OPTION>"
echo '' echo " $MYNAME [INSTALLATION LOCATION]"
exit 0 echo
echo "Available options:"
echo " --version output version information and exit"
echo " --help display this help and exit"
echo
echo "INSTALLATION LOCATION is an optional argument which specifies the MegaGlest"
echo "installation directory, containing the '$Exec_2' wrapper script."
echo; exit 0
fi fi
if [ "$1"'x' = '-hx' -o "$1"'x' = '--helpx' ] if [ "$1" != "" ]; then INSTALLATION_LOCATION="$1"; INSTALLATION_LOCATION_TYPE="arg"
then elif [ "$INSTALLATION_LOCATION" != "" ]; then INSTALLATION_LOCATION_TYPE="var"
echo 'Usage:' elif [ -d "$Default_location" ]; then INSTALLATION_LOCATION="$Default_location"
echo ' '"$MYNAME"' <OPTION>' INSTALLATION_LOCATION_TYPE="def"
echo ' '"$MYNAME"' [INSTALLATION LOCATION]' elif [ "$(which "$Exec_2" 2>/dev/null)" != "" ]; then
echo '' INSTALLATION_LOCATION="$(dirname "$(which "$Exec_2")")"; INSTALLATION_LOCATION_TYPE="def2"
echo 'Available options:' else INSTALLATION_LOCATION=""; fi
echo ' --version output version information and exit'
echo ' --help display this help and exit' if [ "$INSTALLATION_LOCATION_TYPE" = "def2" ]; then Executable="$Exec_2"
echo '' elif [ -f "$INSTALLATION_LOCATION/$Exec_1" ]; then Executable="$Exec_1"
echo 'INSTALLATION LOCATION is an optional argument which specifies the MegaGlest' elif [ -f "$INSTALLATION_LOCATION/$Exec_2" ]; then Executable="$Exec_2"
echo 'installation directory, containing the "start_megaglest" wrapper script.' else Executable=""; fi
echo '' common_info () {
exit 0 echo >&2
echo "Please specify the directory you installed to (which must contain the" >&2
echo "'$Exec_2' file) as first parameter to this script, e.g.:" >&2
echo " $MYNAME /home/user/MegaGlest-3" >&2
echo >&2
echo "You may try to use the following commands to locate it:" >&2
echo " locate -b $Exec_2" >&2
echo " find -type f -name $Exec_2 ~/" >&2
echo " sudo find -type f -name $Exec_2 /" >&2
echo >&2
echo "Please be aware that this script is written to work with installations created" >&2
echo "using the installation instructions on http://megaglest.org. It may or may not" >&2
echo "work with variants of MegaGlest which were packaged by your Linux distribution." >&2
echo >&2; exit 1
}
if ( [ "$INSTALLATION_LOCATION_TYPE" = "def" ] || [ "$INSTALLATION_LOCATION_TYPE" = "def2" ] ) && \
[ "$Executable" != "" ]; then
echo "WARNING: Using automatically selected installation directory '$INSTALLATION_LOCATION/'" >&2
echo " This is usually what you want. To manually specify it, see --help." >&2
elif ( [ "$INSTALLATION_LOCATION_TYPE" = "def" ] && [ "$Executable" = "" ] ) || \
[ "$INSTALLATION_LOCATION" = "" ]; then
echo "ERROR: Unable to determine MegaGlest installation location." >&2
echo >&2
common_info
elif ( [ "$INSTALLATION_LOCATION_TYPE" = "var" ] || [ "$INSTALLATION_LOCATION_TYPE" = "arg" ] ) && \
[ "$Executable" = "" ]; then
echo "ERROR: The INSTALLATION_LOCATION you provided is unusable:" >&2
echo " $INSTALLATION_LOCATION" >&2
common_info
fi fi
if [ "$REPORT_LOCATION" = "" ]; then REPORT_LOCATION="$SCRIPTDIR/$DEFAULT_REPORT_FILENAME"; fi
if [ "$REPORT_LOCATION"'x' = 'x' ] if [ "$PAUSE" = "" ]; then PAUSE=1; fi
then
REPORT_LOCATION=$DEFAULT_REPORT_FILENAME
fi
if [ "$PAUSE"'x' = 'x' ]
then
PAUSE=1
fi
# Check whether report file is writable # Check whether report file is writable
rm -f "$REPORT_LOCATION" rm -f "$REPORT_LOCATION"
touch "$REPORT_LOCATION" >/dev/null 2>&1 touch "$REPORT_LOCATION" >/dev/null 2>&1
if [ "$?"'x' != '0x' ] if [ "$?" -ne "0" ]; then # Unable to write report file
then # Unable to write report file rm -f "/tmp/$DEFAULT_REPORT_FILENAME"
rm -f /tmp/$DEFAULT_REPORT_FILENAME touch "/tmp/$DEFAULT_REPORT_FILENAME" >/dev/null 2>&1
touch /tmp/$DEFAULT_REPORT_FILENAME >/dev/null 2>&1 if [ "$?" -ne "0" ]; then # Unable to write to backup report file location
if [ "$?"'x' != '0x' ] echo "ERROR: Unable to write to either $REPORT_LOCATION or /tmp/$DEFAULT_REPORT_FILENAME" >&2
then # Unable to write to backup report file location echo " Please edit this script and set REPORT_LOCATION to a writable location." >&2
echo 'ERROR: Unable to write to either '"$REPORT_LOCATION"' or /tmp/'"$DEFAULT_REPORT_FILENAME" >&2 echo >&2
echo ' Please edit this script and set REPORT_LOCATION to a writable location.' >&2
echo '' >&2
rm -f "$REPORT_LOCATION" rm -f "$REPORT_LOCATION"
exit 1 exit 1
else # Writing to backup report file location succeeded else # Writing to backup report file location succeeded
echo 'WARNING: Unable to write to '"$REPORT_LOCATION"'.' echo "WARNING: Unable to write to $REPORT_LOCATION." >&2
echo ' I will write to /tmp/'"$DEFAULT_REPORT_FILENAME"' (which is writable) instead.' >&2 echo " It will be writen to '/tmp/$DEFAULT_REPORT_FILENAME' (which is writable) instead." >&2
echo '' >&2 echo >&2
REPORT_LOCATION=/tmp/$DEFAULT_REPORT_FILENAME REPORT_LOCATION="/tmp/$DEFAULT_REPORT_FILENAME"
fi fi
fi fi
rm -f "$REPORT_LOCATION" rm -f "$REPORT_LOCATION"
el_in_report () {
installation_location_unusable () { i=0; if [ "$1" = "" ] || [ "$1" -eq "0" ]; then rep_l=1; else rep_l="$1"; fi
echo 'ERROR: The INSTALLATION_LOCATION you provided is unusable:' >&2 while [ "$i" -le "$rep_l" ]; do
echo ' '"$INSTALLATION_LOCATION" >&2 echo >> "$REPORT_LOCATION"; sleep 0.1s
echo '' >&2 i="$(( i + 1 ))"
echo 'Please specify the directory you installed to (which must contain the' >&2 done
echo 'start_megaglest script) as first parameter to this script, e.g.:' >&2
echo ' '"$MYNAME"' /home/paulo/MegaGlest-3' >&2
echo '' >&2
echo 'You may try to use the following commands to locate the script:' >&2
echo ' locate -b '"'"'\start_megaglest'"'" >&2
echo ' find -type f -name start_megaglest ~/' >&2
echo ' sudo find -type f -name start_megaglest /' >&2
echo '' >&2
echo 'Please be aware that this script is written to work with installations created' >&2
echo 'using the installation instructions on http://megaglest.org. It may or may not' >&2
echo 'work with variants of MegaGlest which were packaged by your Linux distribution.' >&2
echo '' >&2
} }
# Locate MegaGlest installation location
if [ "$INSTALLATION_LOCATION"'x' != 'x' ] # The user provided an installation directory via env. variable
then
if [ -f "$INSTALLATION_LOCATION/start_megaglest" -o -h "$INSTALLATION_LOCATION/start_megaglest" ]
then # The user provided an installation directory which is usable
true
else # The user provided an installation directory which is NOT usable
installation_location_unusable
exit 1
fi
else # The user did not specify the $INSTALLATION_LOCATION environment variable
if [ "$1"'x' != 'x' ]
then # The user did, however, specify the installation location as a command line argument
INSTALLATION_LOCATION=$1
if [ -f "$INSTALLATION_LOCATION/start_megaglest" -o -h "$INSTALLATION_LOCATION/start_megaglest" ]
then # The user provided an installation directory which is usable
true
else # The user provided an installation directory which is NOT usable
installation_location_unusable
exit 1
fi
else # The user did not specify the installation location at all
if [ -f ~/megaglest/start_megaglest -o -h ~/megaglest/start_megaglest ]
then # However, there is a usable installation at ~/megaglest/
INSTALLATION_LOCATION=~/megaglest
echo 'WARNING: Using automatically selected installation directory ~/megaglest' >&2
echo ' This is usually what you want. To manually specify it, see --help.' >&2
echo '' >&2
else # Failed to guess the installation location, so give up.
echo 'ERROR: Unable to determine MegaGlest installation location.' >&2
echo '' >&2
echo 'Please specify the directory you installed to (which must contain the' >&2
echo 'start_megaglest script) as first parameter to this script, e.g.:' >&2
echo ' '"$MYNAME"' /home/paulo/MegaGlest-3' >&2
echo '' >&2
echo 'You may try to use the following commands to locate the script:' >&2
echo ' locate -b '"'"'\start_megaglest'"'" >&2
echo ' find -type f -name start_megaglest ~/' >&2
echo ' sudo find -type f -name start_megaglest /' >&2
echo '' >&2
echo 'Please be aware that this script is written to work with installations' >&2
echo 'created using the instructions on megaglest.org. It may not work with' >&2
echo 'variants of MegaGlest which were packaged by your Linux distribution.' >&2
echo '' >&2
exit 1
fi
fi
fi
# Start gathering information, writing it to REPORT_LOCATION # Start gathering information, writing it to REPORT_LOCATION
cat <<'EOF' cat <<'EOF'
@ -220,12 +196,10 @@ echo ' '"`date -Ru`" >> $REPORT_LOCATION
echo '--------------------------------------------------------------------------------' >> $REPORT_LOCATION echo '--------------------------------------------------------------------------------' >> $REPORT_LOCATION
echo ' → Operating system' echo ' → Operating system'
echo '' >> $REPORT_LOCATION el_in_report 2
echo '' >> $REPORT_LOCATION
echo '***** Operating system *********************************************************' >> $REPORT_LOCATION echo '***** Operating system *********************************************************' >> $REPORT_LOCATION
echo '' >> $REPORT_LOCATION el_in_report
if [ `which lsb_release`'x' = 'x' ] if [ "$(which lsb_release 2>/dev/null)" = "" ]; then
then # no lsb_release in path
lsb=0 lsb=0
release='unknown release' release='unknown release'
if [ -e "/etc/os-release" ]; then if [ -e "/etc/os-release" ]; then
@ -246,111 +220,118 @@ else
release=`lsb_release -r | awk -F':' '{ gsub(/^[ \t]*/,"",$2); print $2 }'` release=`lsb_release -r | awk -F':' '{ gsub(/^[ \t]*/,"",$2); print $2 }'`
codename=`lsb_release -c | awk -F':' '{ gsub(/^[ \t]*/,"",$2); print $2 }'` codename=`lsb_release -c | awk -F':' '{ gsub(/^[ \t]*/,"",$2); print $2 }'`
fi fi
if [ "$KERNEL" = "darwin" ]; then
distribution="$(sw_vers -productName)"; release="$(sw_vers -productVersion)"
fi
architecture=`uname -m` architecture=`uname -m`
echo '* Distribution: '"$distribution" >> $REPORT_LOCATION echo '* Distribution: '"$distribution" >> $REPORT_LOCATION
echo '* Release: '"$release" >> $REPORT_LOCATION echo '* Release: '"$release" >> $REPORT_LOCATION
echo '* Codename: '"$codename" >> $REPORT_LOCATION echo '* Codename: '"$codename" >> $REPORT_LOCATION
echo '* Architecture: '"$architecture" >> $REPORT_LOCATION echo '* Architecture: '"$architecture" >> $REPORT_LOCATION
echo '* LSB support: '"$lsb" >> $REPORT_LOCATION echo '* LSB support: '"$lsb" >> $REPORT_LOCATION
echo '' >> $REPORT_LOCATION el_in_report
echo '>>> uname -a' >> $REPORT_LOCATION echo '>>> uname -a' >> $REPORT_LOCATION
uname -a >> $REPORT_LOCATION 2>&1 uname -a >> $REPORT_LOCATION 2>&1
sleep 1 sleep 1
echo '' >> $REPORT_LOCATION el_in_report
echo '>>> cat /etc/issue' >> $REPORT_LOCATION echo '>>> cat /etc/issue' >> $REPORT_LOCATION
cat /etc/issue >> $REPORT_LOCATION 2>&1 cat /etc/issue >> $REPORT_LOCATION 2>&1
sleep 1 sleep 1
echo ' → MegaGlest version' echo ' → MegaGlest version'
echo '' >> $REPORT_LOCATION el_in_report 2
echo '' >> $REPORT_LOCATION
echo '***** MegaGlest version ********************************************************' >> $REPORT_LOCATION echo '***** MegaGlest version ********************************************************' >> $REPORT_LOCATION
echo '' >> $REPORT_LOCATION el_in_report
echo ">>> INSTALLATION_LOCATION ($INSTALLATION_LOCATION_TYPE): [$INSTALLATION_LOCATION/]." >> $REPORT_LOCATION
if [ "$ERROR_RUNNING_MEGAGLEST"'x' = '0x' -o "$ERROR_RUNNING_MEGAGLEST"'x' = 'x' ] ERROR_RUNNING_MEGAGLEST=0
then # Only run this if MegaGlest didn't already fail last time it was run MG_error_check () {
echo ' (I will now try to run MegaGlest, but it should quit automatically.)' if [ "$1" -eq "0" ]; then ERROR_RUNNING_MEGAGLEST=0
echo '' >> $REPORT_LOCATION else ERROR_RUNNING_MEGAGLEST=1; fi
echo '>>> ./start_megaglest --use-language=en --version' >> $REPORT_LOCATION sleep 1
$INSTALLATION_LOCATION/start_megaglest --use-language=en --version >> $REPORT_LOCATION 2>&1 }
if [ "$?"'x' = '0x' ]
then # all cool if [ "$ERROR_RUNNING_MEGAGLEST" -eq "0" ]; then
ERROR_RUNNING_MEGAGLEST=0 echo ' (MegaGlest will be launched, but should quit automatically.)'
else # an error occurred el_in_report
ERROR_RUNNING_MEGAGLEST=1 echo ">>> ./$Executable --use-language=en --version" >> $REPORT_LOCATION
fi "$INSTALLATION_LOCATION/$Executable" --use-language=en --version >> $REPORT_LOCATION 2>&1
sleep 1 MG_error_check "$?"
else else
echo 'WARNING: A previous run of MegaGlest failed. Skipping test.' >&2 echo 'WARNING: A previous run of MegaGlest failed. Skipping test.' >&2
echo '>>> SKIPPED: ./start_megaglest --use-language=en --version' >> $REPORT_LOCATION echo ">>> SKIPPED: ./$Executable --use-language=en --version" >> $REPORT_LOCATION
fi fi
echo ' → CPU' echo ' → CPU'
echo '' >> $REPORT_LOCATION el_in_report 2
echo '' >> $REPORT_LOCATION
echo '***** CPU **********************************************************************' >> $REPORT_LOCATION echo '***** CPU **********************************************************************' >> $REPORT_LOCATION
echo '' >> $REPORT_LOCATION el_in_report
echo '>>> cat /proc/cpuinfo' >> $REPORT_LOCATION if [ -e "/proc/cpuinfo" ]; then
cat /proc/cpuinfo >> $REPORT_LOCATION echo '>>> cat /proc/cpuinfo' >> $REPORT_LOCATION
cat /proc/cpuinfo >> $REPORT_LOCATION 2>&1
else
echo '>>> sysctl -a | grep machdep.cpu' >> $REPORT_LOCATION
sysctl -a | grep machdep.cpu >> $REPORT_LOCATION 2>&1
fi
sleep 1 sleep 1
echo ' → Memory' echo ' → Memory'
echo '' >> $REPORT_LOCATION el_in_report 2
echo '' >> $REPORT_LOCATION
echo '***** Memory *******************************************************************' >> $REPORT_LOCATION echo '***** Memory *******************************************************************' >> $REPORT_LOCATION
echo '' >> $REPORT_LOCATION el_in_report
echo '>>> free -mt' >> $REPORT_LOCATION if [ "$(which free 2>/dev/null)" != "" ]; then
free -mt >> $REPORT_LOCATION echo '>>> free -mt' >> $REPORT_LOCATION
free -mt >> $REPORT_LOCATION 2>&1
else
echo '>>> top -l 1 -s 0 | grep PhysMem' >> $REPORT_LOCATION
top -l 1 -s 0 | grep PhysMem >> $REPORT_LOCATION 2>&1
echo '>>> sysctl vm.swapusage' >> $REPORT_LOCATION
sysctl vm.swapusage >> $REPORT_LOCATION 2>&1
fi
sleep 1 sleep 1
echo ' → MegaGlest configuration' echo ' → MegaGlest configuration'
echo '' >> $REPORT_LOCATION el_in_report 2
echo '' >> $REPORT_LOCATION
echo '***** MegaGlest configuration **************************************************' >> $REPORT_LOCATION echo '***** MegaGlest configuration **************************************************' >> $REPORT_LOCATION
echo '' >> $REPORT_LOCATION el_in_report
# Currently commented out due to http://glest.org/glest_board/?topic=8482 if [ "$ERROR_RUNNING_MEGAGLEST" -eq "0" ]; then
#if [ "$ERROR_RUNNING_MEGAGLEST"'x' = '0x' -o "$ERROR_RUNNING_MEGAGLEST"'x' = 'x' ] echo ' (MegaGlest will be launched, but should quit automatically.)'
#then # Only run this if MegaGlest didn't already fail last time it was run echo ">>> ./$Executable --use-language=en --show-ini-settings" >> $REPORT_LOCATION
echo ' (I will now try to run MegaGlest, but it should quit automatically.)' "$INSTALLATION_LOCATION/$Executable" --use-language=en --show-ini-settings >> $REPORT_LOCATION 2>&1
echo '' >> $REPORT_LOCATION MG_error_check "$?"
echo '>>> ./start_megaglest --use-language=en --show-ini-settings' >> $REPORT_LOCATION else
$INSTALLATION_LOCATION/start_megaglest --use-language=en --show-ini-settings >> $REPORT_LOCATION 2>&1 echo 'WARNING: A previous run of MegaGlest failed. Skipping test.'
if [ "$?"'x' = '0x' ] echo ">>> SKIPPED: ./$Executable --use-language=en --show-ini-settings" >> $REPORT_LOCATION
then # all cool fi
ERROR_RUNNING_MEGAGLEST=0
else # an error occurred
ERROR_RUNNING_MEGAGLEST=1
fi
sleep 1
#else
# echo 'WARNING: A previous run of MegaGlest failed. Skipping test.' >&2
# echo '>>> SKIPPED: ./start_megaglest --use-language=en --show-ini-settings' >> $REPORT_LOCATION
#fi
echo ' → Graphics' echo ' → Graphics'
echo '' >> $REPORT_LOCATION el_in_report 2
echo '' >> $REPORT_LOCATION
echo '***** Graphics *****************************************************************' >> $REPORT_LOCATION echo '***** Graphics *****************************************************************' >> $REPORT_LOCATION
echo '' >> $REPORT_LOCATION el_in_report
if [ "`which lspci`"'x' = 'x' ] if [ "$(which lspci 2>/dev/null)" = "" ]; then
then # not available in search path
echo 'WARNING: "lspci" utility is not available.' >&2 echo 'WARNING: "lspci" utility is not available.' >&2
echo ' Consider installing it to provide more useful information on your system.' >&2 echo ' Consider installing it to provide more useful information on your system.' >&2
echo '' >&2 echo '' >&2
echo '>>> SKIPPED: lspci -knnv | grep -EA12 '"'"'(VGA|Display)'"'" >> $REPORT_LOCATION echo '>>> SKIPPED: lspci -knnv | grep -EA12 '"'"'(VGA|Display)'"'" >> $REPORT_LOCATION
if [ "$KERNEL" = "darwin" ]; then
echo >&2
echo ">>> ioreg -l | grep PCI" >> $REPORT_LOCATION
ioreg -l | grep PCI >> $REPORT_LOCATION 2>&1
fi
else # it's available else # it's available
echo ">>> lspci -knnv | grep -EA12 '(VGA|Display)'" >> $REPORT_LOCATION echo ">>> lspci -knnv | grep -EA12 '(VGA|Display)'" >> $REPORT_LOCATION
lspci -knnv | grep -EA12 '(VGA|Display)' >> $REPORT_LOCATION 2>&1 lspci -knnv | grep -EA12 '(VGA|Display)' >> $REPORT_LOCATION 2>&1
fi fi
sleep 1 sleep 1
echo '' >> $REPORT_LOCATION el_in_report
echo '----------------------------------------' >> $REPORT_LOCATION
if [ "`which xrandr`"'x' = 'x' ] el_in_report
then # not available in search path if [ "$(which xrandr 2>/dev/null)" = "" ]; then
echo 'WARNING: "xrandr" utility is not available.' >&2 echo 'WARNING: "xrandr" utility is not available.' >&2
echo ' Consider installing it to provide more useful information on your system.' >&2 echo ' Consider installing it to provide more useful information on your system.' >&2
echo '' >&2 echo '' >&2
@ -360,29 +341,22 @@ else # it's available
xrandr >> $REPORT_LOCATION 2>&1 xrandr >> $REPORT_LOCATION 2>&1
fi fi
sleep 1 sleep 1
echo '' >> $REPORT_LOCATION el_in_report
echo '----------------------------------------' >> $REPORT_LOCATION
# Currently commented out due to http://glest.org/glest_board/?topic=8482 if [ "$ERROR_RUNNING_MEGAGLEST" -eq "0" ]; then
#if [ "$ERROR_RUNNING_MEGAGLEST"'x' = '0x' -o "$ERROR_RUNNING_MEGAGLEST"'x' = 'x' ] echo ' (MegaGlest will be launched, but should quit automatically.)'
#then # Only run this if MegaGlest didn't already fail last time it was run el_in_report
echo ' (I will now try to run MegaGlest, but it should quit automatically.)' echo ">>> ./$Executable --use-language=en --opengl-info" >> $REPORT_LOCATION
echo '' >> $REPORT_LOCATION "$INSTALLATION_LOCATION/$Executable" --use-language=en --opengl-info >> $REPORT_LOCATION 2>&1
echo '>>> ./start_megaglest --use-language=en --opengl-info' >> $REPORT_LOCATION MG_error_check "$?"
$INSTALLATION_LOCATION/start_megaglest --use-language=en --opengl-info >> $REPORT_LOCATION 2>&1 else
if [ "$?"'x' = '0x' ] echo 'WARNING: A previous run of MegaGlest failed. Skipping test.' >&2
then # all cool echo ">>> SKIPPED: ./$Executable --use-language=en --opengl-info" >> $REPORT_LOCATION
ERROR_RUNNING_MEGAGLEST=0 fi
else # an error occurred el_in_report
ERROR_RUNNING_MEGAGLEST=1 echo '----------------------------------------' >> $REPORT_LOCATION
fi el_in_report
sleep 1 if [ "$(which glxinfo 2>/dev/null)" = "" ]; then
#else
# echo 'WARNING: A previous run of MegaGlest failed. Skipping test.' >&2
# echo '>>> SKIPPED: ./start_megaglest --use-language=en --opengl-info' >> $REPORT_LOCATION
#fi
if [ "`which glxinfo`"'x' = 'x' ]
then # not available in search path
echo 'WARNING: "glxinfo" utility is not available.' >&2 echo 'WARNING: "glxinfo" utility is not available.' >&2
echo ' Consider installing it to provide more useful information on your system.' >&2 echo ' Consider installing it to provide more useful information on your system.' >&2
echo '' >&2 echo '' >&2
@ -392,14 +366,9 @@ else
glxinfo | grep -E '^(name|display|server|client|GLX|OpenGL)' >> $REPORT_LOCATION 2>&1 glxinfo | grep -E '^(name|display|server|client|GLX|OpenGL)' >> $REPORT_LOCATION 2>&1
fi fi
sleep 1 sleep 1
echo '' >> $REPORT_LOCATION el_in_report
echo '' >> $REPORT_LOCATION
echo '--------------------------------------------------------------------------------' >> $REPORT_LOCATION echo '--------------------------------------------------------------------------------' >> $REPORT_LOCATION
echo '' >> $REPORT_LOCATION el_in_report
echo '' >> $REPORT_LOCATION
echo '' >> $REPORT_LOCATION
echo '' echo ''
echo ' Processing complete.' echo ' Processing complete.'
echo '________________________________________________________________________________' echo '________________________________________________________________________________'
@ -417,14 +386,13 @@ echo ' take note of this new location/URL/Internet address and make it available
echo ' the MegaGlest developers. Unless you were instructed to do otherwise, please' echo ' the MegaGlest developers. Unless you were instructed to do otherwise, please'
echo ' post both the Internet address of where you uploaded to and a verbose' echo ' post both the Internet address of where you uploaded to and a verbose'
echo ' description of the issues you are experiencing at' echo ' description of the issues you are experiencing at'
echo ' http://forums.megaglest.org' echo ' http://forum.megaglest.org'
echo '' echo ''
echo ' Thank you for making it easy for us to assist you,' echo ' Thank you for making it easy for us to assist you,'
echo '' echo ''
echo ' -- The MegaGlest development team' echo ' -- The MegaGlest development team'
if [ "$PAUSE"'x' = '1x' -o "$PAUSE"'x' = 'truex' ] if [ "$PAUSE" -eq "1" ] || [ "$PAUSE" = "true" ]; then
then
echo '________________________________________________________________________________' echo '________________________________________________________________________________'
echo '' echo ''
echo ' Please read all of the above, then press return to exit.' echo ' Please read all of the above, then press return to exit.'