From a4769bb3f632e8f5e6bdc6116482d53724d78c95 Mon Sep 17 00:00:00 2001 From: Josh Bicking Date: Sun, 26 Mar 2017 16:11:14 -0400 Subject: [PATCH 1/2] Add CS script dir, add JFLAP install script --- scripts/cs/jflap.sh | 85 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100755 scripts/cs/jflap.sh diff --git a/scripts/cs/jflap.sh b/scripts/cs/jflap.sh new file mode 100755 index 0000000..9518ef2 --- /dev/null +++ b/scripts/cs/jflap.sh @@ -0,0 +1,85 @@ +#!/bin/sh -e + +## JFLAP v7 + +DEPS=java-1.8.0-openjdk +PROG=JFLAP +FILE=JFLAP.jar +FILE_URL=http://www.jflap.org/jflaptmp/may15-2011/withoutSource/JFLAP.jar +PROG_NAME=jflap +ICON_URL=http://jflap.org/jflapLogo2.jpg + + +# Check that the current user is root +if [ $EUID != 0 ] +then + echo "Please run this script as root (sudo $@$0)." + exit +fi + + +# Install dependencies + +dnf install $DEPS -y + + +# Make the dirs + +mkdir -p /usr/local/$PROG + + +# Get the files + +curl -o /usr/local/$PROG/$FILE $FILE_URL + + +# Make a link + +cat > /usr/local/bin/$PROG_NAME < /usr/local/share/applications/$PROG.desktop < Date: Sun, 2 Apr 2017 10:07:27 -0400 Subject: [PATCH 2/2] Move libs to /usr/share/java, focus on links --- scripts/cs/jflap.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/cs/jflap.sh b/scripts/cs/jflap.sh index 9518ef2..22e264a 100755 --- a/scripts/cs/jflap.sh +++ b/scripts/cs/jflap.sh @@ -4,9 +4,10 @@ DEPS=java-1.8.0-openjdk PROG=JFLAP +DIR=/usr/share/java/JFLAP FILE=JFLAP.jar FILE_URL=http://www.jflap.org/jflaptmp/may15-2011/withoutSource/JFLAP.jar -PROG_NAME=jflap +LINK=/usr/local/bin/jflap ICON_URL=http://jflap.org/jflapLogo2.jpg @@ -25,24 +26,24 @@ dnf install $DEPS -y # Make the dirs -mkdir -p /usr/local/$PROG +mkdir -p $DIR # Get the files -curl -o /usr/local/$PROG/$FILE $FILE_URL +curl -o $DIR/$FILE $FILE_URL # Make a link -cat > /usr/local/bin/$PROG_NAME < $LINK <