#!/bin/sh # # MegaGlest System Report # # Examines the Linux operating environment of a MegaGlest installation and # dumps this information into REPORT_LOCATION for support purposes. # # ----------------------------------------------------------------------------- # # Written by Tom Reynolds # Copyright (c) 2012-2017 Tom Reynolds, The MegaGlest Team, under GNU GPL v3.0 # # ----------------------------------------------------------------------------- # # Configuration section # Location to write report to #REPORT_LOCATION= # MegaGlest installation directory, see --help #INSTALLATION_LOCATION= # Make user press Enter to exit #PAUSE=1 # End of configuration section # # ----------------------------------------------------------------------------- # LANG=C VERSION='0.3.5' MYNAME="$(basename "$0")" 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" = "-h" ] || [ "$1" = "--help" ]; then echo "Usage:" echo " $MYNAME