blob: 95c7123e663dff37329717070c3795f3e73190f9 [file] [log] [blame]
Jonathan Hart59c036f2015-04-01 16:33:33 -07001#!/bin/bash
2
3export USER=distributed
4export USER_HOME=/home/${USER}
5
6echo "Creating distributed tutorial"
7
8IDEA_URL=http://download.jetbrains.com/idea/ideaIC-14.0.2.tar.gz
9
10cd ~
11
12git clone https://github.com/bocon13/onos-byon.git
13
14sed -i -e 's/open/xdg-open/' ~/onos/tools/test/bin/onos-gui
15
16cat > ~/startmn.sh << EOF
17#!/bin/bash
18sudo python ~/onos/tools/test/topos/sol.py \$OC1 \$OC2 \$OC3
19EOF
20
21chmod +x ~/startmn.sh
22
23DESKTOP=${USER_HOME}/Desktop
24
25mkdir -p ${DESKTOP}
26
27cat > ${DESKTOP}/IntelliJ << EOF
28[Desktop Entry]
29Encoding=UTF-8
30Type=Application
31Name=IntelliJ
32Name[en_US]=IntelliJ
33Icon=/home/distributed/Applications/idea/bin/idea.png
34Exec=/home/distributed/Applications/idea/bin/idea.sh
35Comment[en_US]=
36EOF
37
38cat > ${DESKTOP}/Tutorial << EOF
39[Desktop Entry]
40Encoding=UTF-8
41Type=Application
42Name=ONOS Tutorial
43Name[en_US]=ONOS Tutorial
44Icon=internet-web-browser
45Exec=/usr/bin/chromium-browser https://wiki.onosproject.org/display/ONOS/Distributed+ONOS+Tutorial
46Comment[en_US]=
47EOF
48
49
50cat > ${DESKTOP}/Wireshark << EOF
51[Desktop Entry]
52Encoding=UTF-8
53Type=Application
54Name=Wireshark
55Name[en_US]=Wireshark
56Icon=wireshark
57Exec=/usr/bin/wireshark
58Comment[en_US]=
59EOF
60
61cat > ${DESKTOP}/Terminal << EOF
62[Desktop Entry]
63Encoding=UTF-8
64Name=LXTerminal
65TryExec=lxterminal
66Exec=lxterminal
67Icon=lxterminal
68Type=Application
69Categories=GTK;Utility;TerminalEmulator;
70EOF
71
72sudo apt-get install -y git-review
73
74# Install IntelliJ
75mkdir ~/Applications
76cd ~/Applications
77
78wget -c -N -O /tmp/idea.tar.gz ${IDEA_URL}
79tar xzf /tmp/idea.tar.gz
80sudo mv idea-IC-139.659.2 idea
81
82cd -