BASH   94

FretsOnFire universal install sh

Guest on 19th June 2022 05:27:21 AM

  1. #/bin/sh
  2. #This script was created by John coghill <Liberion> (liberion@gmail.com).
  3. #This is distrbuted under the Q public license all rights reserved.
  4. #The package is built from standard linux binary tarball,no modifications
  5. #to the code have been made.
  6. #The amanith library uses Q-Public license
  7. #so if you desire the amanith sourcecode it can be found at
  8. #www.amamith.org
  9. #if you desire the sourcecode to FretsOnFire uncomment the line below
  10. #wget http://louhi.kempele.fi/~skyostil/uv/fretsonfire/dist/FretsOnFire-src-1.1.324.tar.gz
  11. #created 12/22
  12. #YOU MUST BE ROOT TO RUN THIS SCRIPT!IT ALSO REQUIRES SDL!
  13. #If you are using Ubuntu start the script by
  14. #sudo sh FretsOnFire-universal-install.sh
  15. #last revised 07/30
  16. clear
  17. echo "What is the version number of the linux binary package to be"
  18. echo "downloaded?The current version number as of 12/22/2006"
  19. echo "is 1.2.451"
  20. echo "Please enter version number you want."
  21. read vn
  22. buildir=$(pwd)
  23. #now we need to download the FretsonFire Linux binary
  24. cd $buildir
  25. wget http://downloads.sourceforge.net/fretsonfire/FretsOnFire-1.2.451-linux.tar.gz?use_mirror=osdn
  26. #Now we extract the tarball in the pwd.
  27. tar xzvf $buildir/FretsOnFire-$vn-linux.tar.gz
  28. #Now we need to move the FretsOnFire ,and other things.
  29. mkdir -p /usr/share/FretsOnFire
  30. cd $buildir
  31. cp -R  FretsOnFire/* /usr/share/FretsOnFire
  32. #Now we need to build a specific script that will run as a binary in
  33. #/usr/bin
  34. cat <<EOF > /usr/bin/FretsOnFire
  35. #!/bin/sh
  36. export LD_LIBRARY_PATH=/usr/share/FretsOnFire
  37. cd /usr/share/FretsOnFire
  38. exec /usr/share/FretsOnFire/FretsOnFire.bin $@
  39. EOF
  40. #now we need to make the script executable
  41. chmod +x /usr/bin/FretsOnFire
  42. #We will now make a script to remove FretsOnFire
  43. cat <<EOF > /usr/bin/Remove-fretsonfire
  44. rm -r /usr/share/FretsOnFire
  45. rm -f /usr/bin/FretsOnFire
  46. rm -f /usr/share/applications/fretsonfire.desktop
  47. rm -f /usr/bin/Remove-fretsonfire
  48. cd /usr/share -rf FretsONFire
  49. EOF
  50. chmod +x /usr/bin/Remove-fretsonfire
  51. #now we remove Junk from our pwd.
  52. rm -r FretsOnFire-$vn-linux.tar.gz
  53. rm -r $buildir/FretsOnFire
  54. #now we need to create a desktop file
  55. cat <<EOF > /usr/share/applications/fretsonfire.desktop
  56. [Desktop Entry]
  57. Encoding=UTF-8
  58. Name=FretsOnFire
  59. GenericName=A Fantastic Guitar Game.
  60. Exec=/usr/bin/FretsOnFire
  61. StartupWMClass=FretsOnFire
  62. Icon=/usr/share/FretsOnFire/data/icon.png
  63. Type=Application;Game
  64. EOF
  65. echo "FretsOnFire is now Installed!"
  66. echo "If you decide to upgrade, or remove either"
  67. echo "way you must remove the old FretsonFire."
  68. echo "You do this by running as root user Remove-fretsonfire"
  69. echo "if using Ubuntu you would simply"
  70. echo "sudo /usr/bin/Remove-fretsonfire."
  71. echo "Special thanks goes to my cousin Jennnifer Gloyd,"
  72. echo "Jothan Vincent,and Michael Graham."
  73. echo "I have them as the inspiration on building this"
  74. echo "script.They are  guitar afficianodos players!"
  75. echo "Happy Gaming,and let me know how you like it"
  76. echo "emails are welcome at liberion@gmail.com"
  77. echo "thanx!!"

Raw Paste


Login or Register to edit or fork this paste. It's free.