Browse Source

Merge branch 'devel' of github.com:RITlug/TigerOS into devel

website
axk4545 7 years ago
parent
commit
7e696cc745
2 changed files with 174 additions and 0 deletions
  1. +86
    -0
      scripts/cs/jflap.sh
  2. +88
    -0
      scripts/postinstall

+ 86
- 0
scripts/cs/jflap.sh View File

@ -0,0 +1,86 @@
#!/bin/sh -e
## JFLAP v7
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
LINK=/usr/local/bin/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 $DIR
# Get the files
curl -o $DIR/$FILE $FILE_URL
# Make a link
cat > $LINK <<EOF
#!/bin/sh
cd \$HOME
java -jar $DIR/$FILE
EOF
chmod +x $LINK
chmod +x $DIR/$FILE
# Make a desktop file
cat > /usr/local/share/applications/$PROG.desktop <<EOF
[Desktop Entry]
# The type as listed above
Type=Application
# The version of the desktop entry specification to which this file complies
Version=7.0
# The name of the application
Name=$PROG
# A comment which can/will be used as a tooltip
Comment=Experiment with formal languages topics
# The path to the folder in which the executable is run
Path=
# The executable of the application, possibly with arguments.
Exec=$LINK
# The name of the icon that will be used to display this entry
Icon=/usr/local/share/icons/$PROG.jpg
# Describes whether this application needs to be run in a terminal or not
Terminal=false
# Describes the categories in which this entry should be shown
Categories=Education;Languages;Java;
EOF
# Get the icons
mkdir -p /usr/local/share/icons
curl -o /usr/local/share/icons/$PROG.jpg $ICON_URL

+ 88
- 0
scripts/postinstall View File

@ -0,0 +1,88 @@
#!/bin/bash
# TigerOS postinstall package setup script
# Check that the current user is root
if [ $EUID != 0 ]
then
echo "Please run this script as root (sudo $@$0)."
exit
fi
echo -e "Welcome to the TigerOS post install script.\n
This script will install a set of packages used for classes in your major."
echo -e "\n"
sleep 5;
PS3='Please enter your major: '
options=("CS" "IT/WMC" "NSSA/CIT" "SE" "Quit")
select opt in "${options[@]}"
do
case $opt in
"CS")
echo -e "Welcome to the TigerOS CS package installer script.\n
This script will install Intellij, PyCharm, prolog, racket and JFLAP on your machine."
while true; do
read -p "Do you wish to continue? [y/n] " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
esac
done
#call/execute installer scripts here.
;;
"IT/WMC")
echo -e "Welcome to the TigerOS IT/WMC package installer script.
This script will install mysql, mongodb, subversion, filezilla and nodejs on you machine."
while true; do
read -p "Do you wish to continue? [y/n] " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
esac
done
wget https://dev.mysql.com/get/mysql57-community-release-fc25-9.noarch.rpm -O mysql-repo.rpm
sudo dnf install mysql-repo.rpm
sudo dnf install mysql-community-server
echo "mysql installed see https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/ step 4 for further instructions"
sudo dnf install mongodb
sudo semanage port -a -t mongod_port_t -p tcp 27017
#sudo dnf install httpd
sudo dnf install subversion filezilla nodejs php
echo "Install finished"
exit
;;
"NSSA/CIT")
echo -e "Welcome to the TigerOS NSSA/CIT package installer script.\n
This script will install wireshark, python 2.7, python 3 and jGrasp on you machine."
while true; do
read -p "Do you wish to continue? [y/n] " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
esac
done
sudo dnf install wireshark python python3
#call jGrasp installer script here
echo "Install finished"
exit
;;
"SE")
echo -e "Welcome to the TigerOS SE package installer script.\n
This script will install ruby, eclipse, Spin, sqlite3 and MIT Alloy on you machine."
while true; do
read -p "Do you wish to continue? [y/n] " yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
esac
done
sudo dnf install wireshark python python3
#call jGrasp installer script here
echo "Install finished"
exit
;;
"Quit")
break
;;
*) echo invalid option;;
esac
done

Loading…
Cancel
Save