forked from marcelobaptista/packettracer
-
Notifications
You must be signed in to change notification settings - Fork 3
/
install_pt.sh
64 lines (64 loc) · 1.37 KB
/
install_pt.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
#
#EXTRACT FILES
#{{{
echo "creating temporary files..."
DIR="/tmp/PacketTracer/"
if [ -d "$DIR" ]; then
rm -rf "$DIR"
else
mkdir /tmp/PacketTracer/
fi
cp PacketTracer_731_amd64.deb /tmp/PacketTracer/
cd /tmp/PacketTracer/
ar -xv PacketTracer_731_amd64.deb
mkdir control
tar -C control -Jxf control.tar.xz
mkdir data
tar -C data -Jxf data.tar.xz
cd data
#}}}
#
#REMOVE PREVIOUS VERSION
#{{{
rm -rf /opt/pt
rm -rf /usr/share/applications/cisco-pt7.desktop
rm -rf /usr/share/applications/cisco-ptsa7.desktop
rm -rf /usr/share/icons/gnome/48x48/mimetypes/pka.png
rm -rf /usr/share/icons/gnome/48x48/mimetypes/pkt.png
rm -rf /usr/share/icons/gnome/48x48/mimetypes/pkz.png
rm -rf /usr/share/mime/packages/cisco-pka.xml
rm -rf /usr/share/mime/packages/cisco-pkt.xml
rm -rf /usr/share/mime/packages/cisco-pkz.xml
#}}}
#
#COPY FILES USR,OPT
#{{{
cp -r usr /
cp -r opt /
#}}}
#
#Setup The Desktop
#{{{
xdg-desktop-menu install /usr/share/applications/cisco-pt7.desktop
xdg-desktop-menu install /usr/share/applications/cisco-ptsa7.desktop
update-mime-database /usr/share/mime
gtk-update-icon-cache --force --ignore-theme-index /usr/share/icons/gnome
xdg-mime default cisco-ptsa7.desktop x-scheme-handler/pttp
#}}}
#
#Remove temporary files
#{{{
rm -rf /tmp/PacketTracer/
#}}}
#
#It's done
#{{{
echo ""
echo "Press <ENTER> to continue..."
echo ""
read
echo "Bye!Bye!"
echo ""
echo ""
#}}}