Browse Source

add alloy script and add to psotinstall, cleanup jflap script

website
axk4545 7 years ago
parent
commit
a9f2f6815c
3 changed files with 70 additions and 49 deletions
  1. +7
    -39
      scripts/cs/jflap.sh
  2. +10
    -10
      scripts/postinstall
  3. +53
    -0
      scripts/se/alloy.sh

+ 7
- 39
scripts/cs/jflap.sh View File

@ -1,11 +1,11 @@
#!/bin/sh -e #!/bin/sh -e
## JFLAP v7
# JFLAP installer script for TigerOS
# author: Josh Bicking <jhb2345@rit.edu>
DEPS=java-1.8.0-openjdk DEPS=java-1.8.0-openjdk
PROG=JFLAP
DIR=/usr/share/java/JFLAP
FILE=JFLAP.jar
PROG=Alloy
FILE=/usr/share/java/JFLAP.jar
FILE_URL=http://www.jflap.org/jflaptmp/may15-2011/withoutSource/JFLAP.jar FILE_URL=http://www.jflap.org/jflaptmp/may15-2011/withoutSource/JFLAP.jar
LINK=/usr/local/bin/jflap LINK=/usr/local/bin/jflap
ICON_URL=http://jflap.org/jflapLogo2.jpg ICON_URL=http://jflap.org/jflapLogo2.jpg
@ -18,69 +18,37 @@ then
exit exit
fi fi
# Install dependencies # Install dependencies
dnf install $DEPS -y dnf install $DEPS -y
# Make the dirs
mkdir -p $DIR
# Get the files # Get the files
curl -o $DIR/$FILE $FILE_URL
curl -o $FILE $FILE_URL
# Make a link # Make a link
cat > $LINK <<EOF cat > $LINK <<EOF
#!/bin/sh #!/bin/sh
cd \$HOME cd \$HOME
java -jar $DIR/$FILE
java -jar $FILE
EOF EOF
chmod +x $LINK chmod +x $LINK
chmod +x $DIR/$FILE
chmod +x $FILE
# Make a desktop file # Make a desktop file
cat > /usr/local/share/applications/$PROG.desktop <<EOF cat > /usr/local/share/applications/$PROG.desktop <<EOF
[Desktop Entry] [Desktop Entry]
# The type as listed above
Type=Application Type=Application
# The version of the desktop entry specification to which this file complies
Version=7.0 Version=7.0
# The name of the application
Name=$PROG Name=$PROG
# A comment which can/will be used as a tooltip
Comment=Experiment with formal languages topics Comment=Experiment with formal languages topics
# The path to the folder in which the executable is run
Path= Path=
# The executable of the application, possibly with arguments.
Exec=$LINK Exec=$LINK
# The name of the icon that will be used to display this entry
Icon=/usr/local/share/icons/$PROG.jpg Icon=/usr/local/share/icons/$PROG.jpg
# Describes whether this application needs to be run in a terminal or not
Terminal=false Terminal=false
# Describes the categories in which this entry should be shown
Categories=Education;Languages;Java; Categories=Education;Languages;Java;
EOF EOF
# Get the icons # Get the icons
mkdir -p /usr/local/share/icons mkdir -p /usr/local/share/icons
curl -o /usr/local/share/icons/$PROG.jpg $ICON_URL curl -o /usr/local/share/icons/$PROG.jpg $ICON_URL

+ 10
- 10
scripts/postinstall View File

@ -7,7 +7,7 @@
# Check that the current user is root # Check that the current user is root
if [ $EUID != 0 ] if [ $EUID != 0 ]
then then
echo "Please run this script as root (sudo $@$0)."
echo "Please run this script as root ( $@$0)."
exit exit
fi fi
echo -e "Welcome to the TigerOS post install script.\n echo -e "Welcome to the TigerOS post install script.\n
@ -42,13 +42,13 @@ do
esac esac
done done
wget https://dev.mysql.com/get/mysql57-community-release-fc25-9.noarch.rpm -O mysql-repo.rpm wget https://dev.mysql.com/get/mysql57-community-release-fc25-9.noarch.rpm -O mysql-repo.rpm
sudo dnf install -y mysql-repo.rpm
sudo dnf install -y mysql-community-server
dnf install -y mysql-repo.rpm
dnf install -y mysql-community-server
echo "mysql installed see https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/ step 4 for further instructions" echo "mysql installed see https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/ step 4 for further instructions"
sudo dnf install -y mongodb
sudo semanage port -a -t mongod_port_t -p tcp 27017
#sudo dnf install -y httpd
sudo dnf install -y subversion filezilla nodejs php
dnf install -y mongodb
semanage port -a -t mongod_port_t -p tcp 27017
# dnf install -y httpd
dnf install -y subversion filezilla nodejs php
#call jGRASP script here #call jGRASP script here
echo "Install finished" echo "Install finished"
exit exit
@ -63,7 +63,7 @@ do
[Nn]* ) exit;; [Nn]* ) exit;;
esac esac
done done
sudo dnf install -y wireshark python python3
dnf install -y wireshark python python3
#call jGrasp installer script here #call jGrasp installer script here
echo "Install finished" echo "Install finished"
exit exit
@ -78,8 +78,8 @@ do
[Nn]* ) exit;; [Nn]* ) exit;;
esac esac
done done
sudo dnf install -y eclipse-jdt ruby sqlite
#call Spin and Alloy install scripts here
dnf install -y eclipse-jdt ruby sqlite
./se/spin.sh && ./se/alloy.sh
echo "Install finished" echo "Install finished"
exit exit
;; ;;

+ 53
- 0
scripts/se/alloy.sh View File

@ -0,0 +1,53 @@
#!/bin/sh -e
# JFLAP installer script for TigerOS
# author: Josh Bicking <jhb2345@rit.edu>
DEPS=java-1.8.0-openjdk
PROG=Alloy
FILE=/usr/share/java/alloy.jar
FILE_URL=http://alloy.mit.edu/alloy/downloads/alloy4.2.jar
LINK=/usr/local/bin/alloy
# 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
# Get the files
curl -o $FILE $FILE_URL
# Make a link
cat > $LINK <<EOF
#!/bin/sh
cd \$HOME
java -jar $FILE
EOF
chmod +x $LINK
chmod +x $FILE
# Make a desktop file
cat > /usr/local/share/applications/$PROG.desktop <<EOF
[Desktop Entry]
Type=Application
Version=7.0
Name=$PROG
Comment=Experiment with formal languages topics
Path=
Exec=$LINK
Icon=/usr/local/share/icons/$PROG.jpg
Terminal=false
Categories=Education;Languages;Java;
EOF
# Get the icons
mkdir -p /usr/local/share/icons
unzip -j "$FILE" "images/logo.gif" -d "alloy.gif"

Loading…
Cancel
Save