Advertisement
amigojapan

Unity3d Linux crash system profiler and error reporter

Feb 26th, 2013
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.98 KB | None | 0 0
  1. #!/bin/bash
  2. # This is a tool that will help you gather information about the computer in linux and also it will gather the information about the crash of your unity program, you should distribute this program with every linux unity program you have so your users can send you the information about the crash of their program and you can submit a bug report in their behalf.
  3. #run as:$bash unity3d_linux_system_profiler.bash your_unity_binary_name
  4.  
  5.  
  6. #Unity3d crash system profiler
  7. #Copyright Usmar A. Padow 2013 (amigojapan) usmpadow@gmail.com
  8. #linux version
  9. printf "Unity3d linux crash system profiler\n"
  10. if [ -z $1 ]
  11. then
  12. printf "the first argument must be the name of the program\nand you must be in the directory containing the program\nexample: $bash unity3d_linux_system_profiler.bash myprogram\n"
  13. exit
  14. fi
  15. rm Unity3d_System_Profile.txt
  16. printf "Unity3d linux crash system profiler file\n" >>Unity3d_System_Profile.txt;
  17. printf "Copyright Usmar A. Padow 2013 (amigojapan) usmpadow@gmail.com\n" >>Unity3d_System_Profile.txt;
  18. printf "\n\nLinux version and kernel info:\n" >>Unity3d_System_Profile.txt;
  19. uname -a >>Unity3d_System_Profile.txt;
  20. cat /proc/version >>Unity3d_System_Profile.txt;
  21. #videocard info
  22. printf "\n\nPCI info, Videocard info, usually under VGA:\n" >>Unity3d_System_Profile.txt;
  23. lspci -v >>Unity3d_System_Profile.txt;
  24. #memory
  25. printf "\n\nMemory info:\n" >>Unity3d_System_Profile.txt;
  26. cat /proc/meminfo >>Unity3d_System_Profile.txt;
  27. #CPU
  28. printf "\n\nCPU info:\n" >>Unity3d_System_Profile.txt;
  29. cat /proc/cpuinfo >>Unity3d_System_Profile.txt;
  30. printf "\nProgram binary name:\n" >>Unity3d_System_Profile.txt;
  31. echo $1 >>Unity3d_System_Profile.txt;
  32. while true; do
  33.     read -p "Did the program exit before starting GUI mode? " yn
  34.     case $yn in
  35.         [Yy]* )
  36.             printf "Processing...\n"
  37.             printf "execution error log:\n" >>Unity3d_System_Profile.txt
  38.             printf "standard output:\n" >>Unity3d_System_Profile.txt
  39.             ./$1 >>Unity3d_System_Profile.txt
  40.             printf "stderr:\n" >>Unity3d_System_Profile.txt
  41.             ./$1 2>>Unity3d_System_Profile.txt
  42.              printf "Please describe in one line what the bug was. press [enter] when ready to submit:\n";
  43.             read user_input
  44.             printf "\nUser's description of bug:\n" >>Unity3d_System_Profile.txt;
  45.             echo $user_input >>Unity3d_System_Profile.txt;
  46.             printf "OUTPUT stored in Unity3d_System_Profile.txt\n";break;;
  47.         [Nn]* )
  48.             printf "\n\nThe program entered GUI mode succesfully\n" >>Unity3d_System_Profile.txt;
  49.             printf "Please describe in one line what the bug was. press [enter] when ready to submit:\n";
  50.             read user_input
  51.             printf "\nUser's description of bug:\n" >>Unity3d_System_Profile.txt;
  52.             echo $user_input >>Unity3d_System_Profile.txt;
  53.             printf "OUTPUT stored in Unity3d_System_Profile.txt\n";
  54.             exit;;
  55.         * ) printf "Please answer yes or no.";;
  56.     esac
  57. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement