Fedora Remix maintained by the Rochester Institute of Technology (RIT) Linux Users Group, targeted at users new to Linux and RIT students, faculty, and staff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1015 B

  1. #!/bin/sh -e
  2. # JFLAP installer script for TigerOS
  3. # author: Josh Bicking <jhb2345@rit.edu>
  4. DEPS=java-1.8.0-openjdk
  5. PROG=JFLAP
  6. FILE=/usr/share/java/JFLAP.jar
  7. FILE_URL=http://www.jflap.org/jflaptmp/may15-2011/withoutSource/JFLAP.jar
  8. LINK=/usr/local/bin/jflap
  9. ICON_URL=http://jflap.org/jflapLogo2.jpg
  10. # Check that the current user is root
  11. if [ $EUID != 0 ]
  12. then
  13. echo "Please run this script as root (sudo $@$0)."
  14. exit
  15. fi
  16. # Install dependencies
  17. dnf install $DEPS -y
  18. # Get the files
  19. curl -o $FILE $FILE_URL
  20. # Make a link
  21. cat > $LINK <<EOF
  22. #!/bin/sh
  23. cd \$HOME
  24. java -jar $FILE
  25. EOF
  26. chmod +x $LINK
  27. chmod +x $FILE
  28. # Make a desktop file
  29. cat > /usr/local/share/applications/$PROG.desktop <<EOF
  30. [Desktop Entry]
  31. Type=Application
  32. Version=7.0
  33. Name=$PROG
  34. Comment=Experiment with formal languages topics
  35. Path=
  36. Exec=$LINK
  37. Icon=/usr/local/share/icons/$PROG.jpg
  38. Terminal=false
  39. Categories=Education;Languages;Java;
  40. EOF
  41. # Get the icons
  42. mkdir -p /usr/local/share/icons
  43. curl -o /usr/local/share/icons/$PROG.jpg $ICON_URL