
echo "******************************************************" > platform.info
echo "*  Artenum's Platform Information Collection Script  *" >> platform.info
echo "*                Version 1.0.0                       *" >> platform.info
echo "*                                                    *" >> platform.info
echo "* See http://www.artenum.com for further information *" >> platform.info
echo "* (c) Artenum sarl, France, 2011                     *" >> platform.info
echo "******************************************************" >> platform.info
echo >> platform.info

export CURRENT_OS=`uname`

echo "Collected by: "`whoami` >> platform.info
echo "Hostname: "`hostname` >> platform.info
echo "Collection date: "`date` >> platform.info
echo >> platform.info
echo "OS information: " >> platform.info
echo `uname -a` >> platform.info

echo ${CURRENT_OS}

if [ ${CURRENT_OS} == "Darwin" ]; then
   echo "Current OS is Apple OSX with the following version: "`uname -a` >> platform.info
else
   echo "Current OS is a Linux like: " `uname -a` >> platform.info
   cat /etc/*release >> platform.info
   echo >> platform.info
   echo "GLbic version: " >> platform.info
   ldd --version >> platform.info
fi
echo >> platform.info
echo "Gcc version: " >> platform.info
gcc --version >> platform.info

echo "******************************************************" >> platform.info
echo "*                         End                        *" >> platform.info
echo "******************************************************" >> platform.info

