Browse Source

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

website
Tim Zabel 7 years ago
parent
commit
dbc7f26fd4
3 changed files with 76 additions and 6 deletions
  1. +68
    -0
      scripts/cs/logisim.sh
  2. +7
    -5
      scripts/postinstall
  3. +1
    -1
      scripts/removal

+ 68
- 0
scripts/cs/logisim.sh View File

@ -0,0 +1,68 @@
#!/bin/sh -e
# JFLAP installer script for TigerOS
# author: Josh Bicking <jhb2345@rit.edu>
DEPS=java-1.8.0-openjdk
PROG=Logisim
FILE=/usr/share/java/logisim.jar
FILE_URL=https://sourceforge.net/projects/circuit/files/2.3.x/2.3.1/logisim-2.3.1.jar/download
LINK=/usr/local/bin/logisim
ICON_URL=https://upload.wikimedia.org/wikipedia/commons/thumb/b/ba/Logisim-icon.svg/48px-Logisim-icon.svg.png
# Check that the current user is root
if [ $EUID != 0 ]
then
echo "Please run this script as root (sudo $@$0)."
exit
fi
## Removal
# Check if remove flag was passed
if [ ! -z "$1" ] && [ "$1" = "--remove" ]
then
rm $LINK
rm /usr/local/share/applications/$PROG.desktop
rm $FILE
rm /usr/local/share/icons/$PROG.jpg
else
## Installation
# 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=2.3.1
Name=$PROG
Comment=A grahical tool for designing and simulating logic circuits.
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
curl -o /usr/local/share/icons/$PROG.png $ICON_URL
fi

+ 7
- 5
scripts/postinstall View File

@ -21,7 +21,7 @@ do
case $opt in
"CS")
echo -e "Welcome to the TigerOS CS package installer script.\n
This script will install Intellij IDEA, PyCharm, PROLOG, Racket and JFLAP on your machine."
This script will install Intellij IDEA, PyCharm, PROLOG, Racket, Logisim and JFLAP on your machine."
while true; do
read -p "Do you wish to continue? [y/n] " yn
case $yn in
@ -33,6 +33,7 @@ do
# TODO Pycharm
# TODO PROLOG
# TODO Racket
./cs/logisim.sh
./cs/jflap.sh
;;
"IT/WMC")
@ -51,8 +52,7 @@ do
echo "mysql installed see "https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/" step 4 for further instructions"
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
dnf install -y subversion filezilla nodejs
#call jGRASP script here
mysql_secure_installation
echo "Install finished"
@ -69,13 +69,15 @@ do
esac
done
dnf install -y wireshark-gtk python python3
groupadd wireshark
usermod -aG wireshark $USER
#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."
This script will install ruby, eclipse, Spin, sqlite3, plantUML, gitk and MIT Alloy on you machine."
while true; do
read -p "Do you wish to continue? [y/n] " yn
case $yn in
@ -83,7 +85,7 @@ do
[Nn]* ) exit;;
esac
done
dnf install -y eclipse-jdt ruby sqlite
dnf install -y eclipse-jdt ruby sqlite plantuml gitk geany
./se/spin.sh && ./se/alloy.sh
echo "Install finished"
exit

+ 1
- 1
scripts/removal View File

@ -73,7 +73,7 @@ do
[Nn]* ) exit;;
esac
done
sudo dnf -y remove eclipse-jdt ruby sqlite
sudo dnf -y remove eclipse-jdt ruby sqlite gitk plantuml
# Spin and Alloy need to be implemented in installer script before removal.
echo "All files have been removed."
exit

Loading…
Cancel
Save