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.

53 lines
958 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=Alloy
  6. FILE=/usr/share/java/alloy.jar
  7. FILE_URL=http://alloy.mit.edu/alloy/downloads/alloy4.2.jar
  8. LINK=/usr/local/bin/alloy
  9. # Check that the current user is root
  10. if [ $EUID != 0 ]
  11. then
  12. echo "Please run this script as root (sudo $@$0)."
  13. exit
  14. fi
  15. # Install dependencies
  16. dnf install $DEPS -y
  17. # Get the files
  18. curl -o $FILE $FILE_URL
  19. # Make a link
  20. cat > $LINK <<EOF
  21. #!/bin/sh
  22. cd \$HOME
  23. java -jar $FILE
  24. EOF
  25. chmod +x $LINK
  26. chmod +x $FILE
  27. # Make a desktop file
  28. cat > /usr/local/share/applications/$PROG.desktop <<EOF
  29. [Desktop Entry]
  30. Type=Application
  31. Version=7.0
  32. Name=$PROG
  33. Comment=Experiment with formal languages topics
  34. Path=
  35. Exec=$LINK
  36. Icon=/usr/local/share/icons/$PROG.jpg
  37. Terminal=false
  38. Categories=Education;Languages;Java;
  39. EOF
  40. # Get the icons
  41. mkdir -p /usr/local/share/icons
  42. unzip -j "$FILE" "images/logo.gif" -d "alloy.gif"